Bug 79640
| Summary: | undefined behavior C statements in Imlib | ||
|---|---|---|---|
| Product: | [Retired] Red Hat Linux | Reporter: | d.binderman |
| Component: | imlib | Assignee: | Jonathan Blandford <jrb> |
| Status: | CLOSED UPSTREAM | QA Contact: | |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 8.0 | CC: | ddumas |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2003-02-08 05:39:48 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
Filed upstream as http://bugzilla.gnome.org/show_bug.cgi?id=105558 Maintainer said he'd get to it in a later release. |
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; } Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info: