Description of problem: Hello there, I just tried to compile package bdflush-1.5-21 from Redhat 8.0. Here are some of the compiler messages. bdflush.c:74: warning: operation on `ptr' may be undefined bdflush.c:79: warning: operation on `ptr' may be undefined Here is a patch which fixes the messages. *** ./bdflush.c.old 2002-11-22 14:48:05.000000000 +0000 --- ./bdflush.c 2002-11-22 14:48:55.000000000 +0000 *************** *** 71,82 **** ptr = dst[0] + strlen(dst[0]); for (count = 1; count < argc; count++) { if (dst[count] == ptr + 1) ! ptr += strlen(++ptr); } if (environ[0] == ptr + 1) { for (count = 0; environ[count]; count++) if (environ[count] == ptr + 1) ! ptr += strlen(++ptr); } count = 0; for (ptr2 = dst[0]; ptr2 <= ptr; ptr2++) { --- 71,88 ---- ptr = dst[0] + strlen(dst[0]); for (count = 1; count < argc; count++) { if (dst[count] == ptr + 1) ! { ! ++ptr; ! ptr += strlen( ptr); ! } } if (environ[0] == ptr + 1) { for (count = 0; environ[count]; count++) if (environ[count] == ptr + 1) ! { ! ++ptr; ! ptr += strlen( ptr); ! } } count = 0; for (ptr2 = dst[0]; ptr2 <= ptr; ptr2++) { Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
This rpm is not anymore part of RHL. greetings, Florian La Roche
>This rpm is not anymore part of RHL. I have no information to confirm or deny your claim. The package is part of the current shipping version of RH 8.0 for Intel, and presumably will form part of any RH 8.0 for any other architecture / and or 8.1 and future versions of RH. Could you please point me at a document/URL which shows which part(s) of RH 8.0 are no longer supported since its release a few months ago ?
ANSI requires that arguments to strlen() are only evaluated once. greetings, Florian La Roche
>ANSI requires that arguments to strlen() are only evaluated once True, but irrelevant. The problem is that there is an increment, *and* an += to the same variable, between sequence points. K&R 2, section 2.12, page 53 & 54 in my copy, cover this.
Indeed an error in the source, but I'll close it due to this rpm being removed for future products. greetings, Florian La Roche