The original code assumed that the sizeof returns a long int type, which is true on 64 bits platform but not on 32 bits platforms, as pointed by gcc.
The new code does an explicit conversions to 'int' (which should be enough for that case) so the format specifier in printf will always be ok, whatever platform Window Maker is compiled for. Signed-off-by: Christophe CURIS <[email protected]> --- po/nl.po | 4 ++-- src/dialog.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/po/nl.po b/po/nl.po index 35cb850..674c642 100644 --- a/po/nl.po +++ b/po/nl.po @@ -346,9 +346,9 @@ msgstr "" #: ../src/dialog.c:594 #, c-format -msgid "full path for file \"%s\" in \"%s\" is longer than %ld bytes, skipped" +msgid "full path for file \"%s\" in \"%s\" is longer than %d bytes, skipped" msgstr "" -"volledig pad voor bestand \"%s\" in \"%s\" is langer dan %ld byte, " +"volledig pad voor bestand \"%s\" in \"%s\" is langer dan %d byte, " "overgeslagen" #: ../src/dialog.c:628 diff --git a/src/dialog.c b/src/dialog.c index b7b8f53..56cd3db 100644 --- a/src/dialog.c +++ b/src/dialog.c @@ -591,8 +591,8 @@ static void listPixmaps(WScreen *scr, WMList *lPtr, const char *path) if (wstrlcpy(pbuf, apath, sizeof(pbuf)) >= sizeof(pbuf) || wstrlcat(pbuf, "/", sizeof(pbuf)) >= sizeof(pbuf) || wstrlcat(pbuf, dentry->d_name, sizeof(pbuf)) >= sizeof(pbuf)) { - wwarning(_("full path for file \"%s\" in \"%s\" is longer than %ld bytes, skipped"), - dentry->d_name, path, sizeof(pbuf) - 1); + wwarning(_("full path for file \"%s\" in \"%s\" is longer than %d bytes, skipped"), + dentry->d_name, path, (int) (sizeof(pbuf) - 1) ); continue; } -- 2.1.4 -- To unsubscribe, send mail to [email protected].
