fixincl.c (fix_with_system): Cast pointer difference to long.
authorKai Tietz <kai.tietz@onevision.com>
Fri, 25 Apr 2008 20:45:10 +0000 (22:45 +0200)
committerKai Tietz <ktietz@gcc.gnu.org>
Fri, 25 Apr 2008 20:45:10 +0000 (22:45 +0200)
2008-04-25  Kai Tietz  <kai.tietz@onvision.com>

* fixincl.c (fix_with_system): Cast pointer difference to long.
* fixlib.c (make_raw_shell_str): Cast compare to avoid sign warning.

From-SVN: r134679

fixincludes/ChangeLog
fixincludes/fixincl.c
fixincludes/fixlib.c

index db3ecd0edaddff6492640639d3a60c00f2e446d8..913e34e5c478371791c2191368050e0ffd70c2fc 100644 (file)
@@ -1,3 +1,8 @@
+2008-04-25  Kai Tietz  <kai.tietz@onvision.com>
+
+       * fixincl.c (fix_with_system): Cast pointer difference to long.
+       * fixlib.c (make_raw_shell_str): Cast compare to avoid sign warning.
+
 2008-04-18  Paolo Bonzini  <bonzini@gnu.org>
 
        PR bootstrap/35457
index a6a8abef027c64c10af19394b9c06b7534f3b61d..39b389d6775c969cb22146255c2e24749485ef58 100644 (file)
@@ -829,7 +829,7 @@ fix_with_system (tFixDesc* p_fixd,
       /*
        *  Now add the fix number and file names that may be needed
        */
-      sprintf (pz_scan, " %ld '%s' '%s' '%s'", p_fixd - fixDescList,
+      sprintf (pz_scan, " %ld '%s' '%s'  (long) (p_fixd - fixDescList),
               pz_fix_file, pz_file_source, pz_temp_file);
     }
   else /* NOT an "internal" fix: */
index cc335f5659a16713a2c2dfec405d06e5fea3ab00..2dc9bb1cd9e3ba4f6797afafe31955d806060254 100644 (file)
@@ -259,14 +259,14 @@ make_raw_shell_str( char* pz_d, tCC* pz_s, size_t smax )
   *(pz_d++) = '\'';
 
   for (;;) {
-    if (pz_d - pz_d_start >= smax)
+    if (((size_t) (pz_d - pz_d_start) >= smax)
       return (char*)NULL;
     switch (*(pz_d++) = *(pz_s++)) {
     case NUL:
       goto loopDone;
 
     case '\'':
-      if (pz_d - pz_d_start >= smax - sizeof( zQ )-1)
+      if ((size_t) (pz_d - pz_d_start) >= smax - sizeof( zQ )-1)
        return (char*)NULL;
       strcpy( pz_d-1, zQ );
       pz_d += sizeof( zQ )-2;