bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

sharutils-4.3.60 incompatibility with strict C89


From: Paul Eggert
Subject: sharutils-4.3.60 incompatibility with strict C89
Date: Sun, 30 Jun 2002 22:19:56 -0700 (PDT)

The Sun C compiler warns about this incompatibility of sharutils 4.3.60
with the C Standard:

cc -DLOCALEDIR=\"/tmp/prefix/share/locale\" -DHAVE_CONFIG_H -I. -I. -I.. -I. 
-I.. -I../lib -I../intl     -g -c `test -f 'uudecode.c' || echo './'`uudecode.c
"uudecode.c", line 194: warning: argument #1 is incompatible with prototype:
        prototype: pointer to char : "/usr/include/iso/stdio_iso.h", line 190
        argument : pointer to unsigned char

Here's a patch.

2002-06-30  Paul Eggert  <address@hidden>

        * src/uudecode.c (read_base64): Don't mix char * and unsigned
        char * without casting them, as C89 doesn't allow it.

diff -pru sharutils-4.3.60/src/uudecode.c sharutils-4.3.60-fix/src/uudecode.c
--- sharutils-4.3.60/src/uudecode.c     2002-06-27 11:58:16.000000000 -0700
+++ sharutils-4.3.60-fix/src/uudecode.c 2002-06-30 22:16:18.162967000 -0700
@@ -184,7 +184,7 @@ read_base64 (inname)
     '\177', '\177', '\177', '\177', '\177', '\177', '\177', '\177', /*360-367*/
     '\177', '\177', '\177', '\177', '\177', '\177', '\177', '\177', /*370-377*/
   };
-  unsigned char buf[2 * BUFSIZ];
+  char buf[2 * BUFSIZ];
 
   while (1)
     {
@@ -196,7 +196,7 @@ read_base64 (inname)
          error (0, 0, _("%s: Short file"), inname);
          return 1;
        }
-      p = buf;
+      p = (unsigned char *) buf;
 
       if (memcmp (buf, "====", 4) == 0)
        break;
Only in sharutils-4.3.60-fix/src: uudecode.c~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]