rse         99/04/21 11:25:45

  Modified:    src/main util.c
  Log:
  Remove another warning:
  
  | :> make
  | gcc -c  -I../os/unix -I../include   -funsigned-char -DTARGET=\"apache\" 
-pipe
  | -O -pedantic -Wall -Wshadow -Wpointer-arith -Wcast-align 
-Wmissing-prototypes
  | -Wmissing-declarations -Wnested-externs -Winline `../apaci` util.c
  | util.c: In function `ap_size_list_item':
  | util.c:1028: warning: pointer targets in assignment differ in signedness
  | util.c:1037: warning: pointer targets in assignment differ in signedness
  
  This was caused because the involved function first does a ``const unsigned
  char *ptr = (const unsigned char *)*field;'' for various reasons but later
  didn't the cast again when assigning back ptr to *field. Perhaps the function
  can be rewritten to not use casts at all (Ben?). But at least as long as the
  first "import" cast is done we also need the two "export" casts to make the
  compilers quiet.
  VS: ----------------------------------------------------------------------
  
  Revision  Changes    Path
  1.160     +2 -2      apache-1.3/src/main/util.c
  
  Index: util.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/main/util.c,v
  retrieving revision 1.159
  retrieving revision 1.160
  diff -u -r1.159 -r1.160
  --- util.c    1999/04/17 22:07:59     1.159
  +++ util.c    1999/04/21 18:25:44     1.160
  @@ -1025,7 +1025,7 @@
       }
   
       if ((*len = (ptr - token)) == 0) {
  -        *field = ptr;
  +        *field = (const char *)ptr;
           return NULL;
       }
   
  @@ -1034,7 +1034,7 @@
       while (*ptr == ',' || ap_isspace(*ptr))
        ++ptr;
   
  -    *field = ptr;
  +    *field = (const char *)ptr;
       return (const char *)token;
   }
   
  
  
  

Reply via email to