]> granicus.if.org Git - php/commitdiff
Reduced compiler warnings
authorMoriyoshi Koizumi <moriyoshi@php.net>
Fri, 10 Jan 2003 04:37:26 +0000 (04:37 +0000)
committerMoriyoshi Koizumi <moriyoshi@php.net>
Fri, 10 Jan 2003 04:37:26 +0000 (04:37 +0000)
ext/mime_magic/mime_magic.c

index 1a8e1e7be80266512ff4f80654abd65f52f6e3e0..595fe6b17a1d991672f1cccda845446d76f13355 100644 (file)
@@ -1425,7 +1425,7 @@ static int mget(union VALUETYPE *p, unsigned char *s,
 {
     long offset = m->offset;
 
-    if (offset + sizeof(union VALUETYPE) > nbytes)
+    if (offset + (long)sizeof(union VALUETYPE) > nbytes)
                return 0;
 
     memcpy(p, s + offset, sizeof(union VALUETYPE));
@@ -1447,7 +1447,7 @@ static int mget(union VALUETYPE *p, unsigned char *s,
                        break;
                }
 
-               if (offset + sizeof(union VALUETYPE) > nbytes)
+               if (offset + (long)sizeof(union VALUETYPE) > nbytes)
                        return 0;
 
                memcpy(p, s + offset, sizeof(union VALUETYPE));