GNOME Bugzilla – Bug 105558
undefined behavior C statements in Imlib
Last modified: 2012-02-24 15:30:22 UTC
Description of problem: Hello there, I just tried to compile package imlib-1.9.13-9 from Redhat 8.0. Here are some of the compiler messages. io-ppm.c:179: warning: operation on `a' may be undefined io-ppm.c:180: warning: operation on `a' may be undefined io-ppm.c:197: warning: operation on `a' may be undefined io-ppm.c:198: warning: operation on `a' may be undefined load.c:1467: warning: operation on `a' may be undefined load.c:1468: warning: operation on `a' may be undefined load.c:1485: warning: operation on `a' may be undefined load.c:1486: warning: operation on `a' may be undefined Here is a patch which shuts up the compiler. *** ./gdk_imlib/io-ppm.c.old 2002-11-28 18:47:55.000000000 +0000 --- ./gdk_imlib/io-ppm.c 2002-11-28 18:48:57.000000000 +0000 *************** *** 176,183 **** if ((i > 1) && (isdigit(s[i - 2]))) { ptr[a++] = ((atoi(s)) * 255) / scale; ! ptr[a++] = ptr[a - 1]; ! ptr[a++] = ptr[a - 1]; } i = 0; } --- 176,185 ---- if ((i > 1) && (isdigit(s[i - 2]))) { ptr[a++] = ((atoi(s)) * 255) / scale; ! ptr[a] = ptr[a - 1]; ! a++; ! ptr[a] = ptr[a - 1]; ! a++; } i = 0; } *************** *** 194,201 **** if ((i > 1) && (isdigit(s[i - 2]))) { ptr[a++] = atoi(s); ! ptr[a++] = ptr[a - 1]; ! ptr[a++] = ptr[a - 1]; } i = 0; } --- 196,205 ---- if ((i > 1) && (isdigit(s[i - 2]))) { ptr[a++] = atoi(s); ! ptr[a] = ptr[a - 1]; ! a++; ! ptr[a] = ptr[a - 1]; ! a++; } i = 0; } *** ./Imlib/load.c.old 2002-11-28 18:49:47.000000000 +0000 --- ./Imlib/load.c 2002-11-28 18:50:19.000000000 +0000 *************** *** 1464,1471 **** if ((i > 1) && (isdigit(s[i - 2]))) { ptr[a++] = ((atoi(s)) * 255) / scale; ! ptr[a++] = ptr[a - 1]; ! ptr[a++] = ptr[a - 1]; } i = 0; } --- 1464,1473 ---- if ((i > 1) && (isdigit(s[i - 2]))) { ptr[a++] = ((atoi(s)) * 255) / scale; ! ptr[a] = ptr[a - 1]; ! a++; ! ptr[a] = ptr[a - 1]; ! a++; } i = 0; } *************** *** 1482,1489 **** if ((i > 1) && (isdigit(s[i - 2]))) { ptr[a++] = atoi(s); ! ptr[a++] = ptr[a - 1]; ! ptr[a++] = ptr[a - 1]; } i = 0; } --- 1484,1493 ---- if ((i > 1) && (isdigit(s[i - 2]))) { ptr[a++] = atoi(s); ! ptr[a] = ptr[a - 1]; ! ++a; ! ptr[a] = ptr[a - 1]; ! ++a; } i = 0; }
According to http://ftp.gnome.org/pub/GNOME/sources/imlib/ the last tarball release was on 24-Sep-2004. Same for the last code commit: http://git.gnome.org/browse/archive/imlib/log/ Hence this application has been unmaintained for quite a while and its maintainer will not work on it soon. Please feel free to reopen this bug report in the future if anyone takes the responsibility for active development.