Description of Problem: Hello there, I just tried to compile package ncpfs-2.2.0.18-11 from Redhat 8.0. Here are some of the compiler messages. ncpmount.c:306: warning: operation on `ptr' may be undefined ncpmount.c:311: warning: operation on `ptr' may be undefined Here is a patch which fixes the messages. *** ./sutil/ncpmount.c.old 2002-11-18 10:22:58.000000000 +0000 --- ./sutil/ncpmount.c 2002-11-18 10:24:43.000000000 +0000 *************** *** 303,314 **** 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++) { --- 303,320 ---- 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 Information:
Does not look like a bug or undefined behaviour, Florian La Roche
>Does not look like a bug or undefined behaviour, You need to learn more about ISO C. Try having a look at section 2.12 of K&R 2, about page 53 in my copy.
Fixed in 2.2.1-1, soon in rawhide. greetings, Florian La Roche