diff --git a/README.md b/README.md index 77ac1b3..999a637 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,14 @@ This release was tested against MarIuX. ## Revision History +### Version 3.0p15 - Jan 18 2022 +- fix compilation problems with new gcc version +- Niclas Hofmann, `niclas@molgen.mpg.de` + +### Version 3.0p14 - Jul 20 2021 +- code fixes and optimizations +- Thomas Kreitler, `kreitler@molgen.mpg.de` + ### Version 3.0p13 - Mar 29 2019 - fix , as 1k divider for numerical output - Niclas Hofmann, `niclas@molgen.mpg.de` diff --git a/version.h b/version.h index 4091462..e5cbd05 100644 --- a/version.h +++ b/version.h @@ -1 +1 @@ -#define XDU_VERSION "3.0p14" +#define XDU_VERSION "3.0p15" diff --git a/xdu.c b/xdu.c index 841da30..83163a3 100644 --- a/xdu.c +++ b/xdu.c @@ -730,10 +730,10 @@ void printpath(int x, int y) np = findnode(&top, x, y); if (np == NULL) return; - asprintf(&path, "%s", np->name); + (void) asprintf(&path, "%s", np->name); while (np->parent != NULL) { tmp_path = path; - asprintf(&path, "%s/%s", np->parent->name, path); + (void) asprintf(&path, "%s/%s", np->parent->name, path); np = np->parent; free(tmp_path); } diff --git a/xwin.c b/xwin.c index 65518e8..0c6e3d1 100644 --- a/xwin.c +++ b/xwin.c @@ -210,6 +210,9 @@ static char defaultTranslations[] = "\ ALL_UNUSED_IMPL(VA_NUM_ARGS(__VA_ARGS__)) \ (__VA_ARGS__) +/* Assuming that there will never be a file lager than 999 petabytes. */ +#define MAX_NUMBER_LABEL_LENGTH 23 + /* * action routines */ @@ -500,7 +503,7 @@ void xrepaint() void readable_float(float number, char* number_label) { - char number_string[1024]; + char number_string[MAX_NUMBER_LABEL_LENGTH]; int i, j, length; sprintf(number_string, "%.2f", number); length = (strlen(number_string) - 4) / 3 + strlen(number_string); @@ -517,7 +520,7 @@ void readable_float(float number, char* number_label) void readable_long_long(long long number, char* number_label) { - char number_string[1024]; + char number_string[MAX_NUMBER_LABEL_LENGTH]; int i, j, length; sprintf(number_string, "%lld", number); length = (strlen(number_string) - 1) / 3 + strlen(number_string); @@ -537,7 +540,7 @@ void xdrawrect(char* name, long long size, int x, int y, int width, int height) int textx, texty; char label[1024]; - char number_label[1024]; + char number_label[MAX_NUMBER_LABEL_LENGTH]; XCharStruct overall; int ascent, descent,