gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r37534 - libmicrohttpd/src/microhttpd


From: gnunet
Subject: [GNUnet-SVN] r37534 - libmicrohttpd/src/microhttpd
Date: Wed, 13 Jul 2016 09:13:04 +0200

Author: Karlson2k
Date: 2016-07-13 09:13:04 +0200 (Wed, 13 Jul 2016)
New Revision: 37534

Modified:
   libmicrohttpd/src/microhttpd/mhd_str.c
Log:
mhd_str.c: fix compiler warnings

Modified: libmicrohttpd/src/microhttpd/mhd_str.c
===================================================================
--- libmicrohttpd/src/microhttpd/mhd_str.c      2016-07-13 06:58:35 UTC (rev 
37533)
+++ libmicrohttpd/src/microhttpd/mhd_str.c      2016-07-13 07:13:04 UTC (rev 
37534)
@@ -306,7 +306,7 @@
     {
       const int digit = (unsigned char)(*str) - '0';
       if ( (res > (UINT64_MAX / 10)) ||
-           (res == (UINT64_MAX / 10) && digit > (UINT64_MAX % 10)) )
+           (res == (UINT64_MAX / 10) && (uint64_t)digit > (UINT64_MAX % 10)) )
         return 0;
 
       res *= 10;
@@ -345,7 +345,7 @@
     {
       const int digit = (unsigned char)str[i] - '0';
       if ( (res > (UINT64_MAX / 10)) ||
-           (res == (UINT64_MAX / 10) && digit > (UINT64_MAX % 10)) )
+           (res == (UINT64_MAX / 10) && (uint64_t)digit > (UINT64_MAX % 10)) )
         return 0;
 
       res *= 10;
@@ -381,7 +381,7 @@
   while (digit >= 0)
     {
       if ( (res < (SIZE_MAX / 16)) ||
-           (res == (SIZE_MAX / 16) && digit <= (SIZE_MAX % 16)) )
+           (res == (SIZE_MAX / 16) && (size_t)digit <= (SIZE_MAX % 16)) )
         {
           res *= 16;
           res += digit;
@@ -424,7 +424,7 @@
   while (i < maxlen && (digit = toxdigitvalue (str[i])) >= 0)
     {
       if ( (res > (SIZE_MAX / 16)) ||
-           (res == (SIZE_MAX / 16) && digit > (SIZE_MAX % 16)) )
+           (res == (SIZE_MAX / 16) && (size_t)digit > (SIZE_MAX % 16)) )
         return 0;
 
       res *= 16;
@@ -461,7 +461,7 @@
   while (digit >= 0)
     {
       if ( (res < (UINT32_MAX / 16)) ||
-           (res == (UINT32_MAX / 16) && digit <= (UINT32_MAX % 16)) )
+           (res == (UINT32_MAX / 16) && (uint32_t)digit <= (UINT32_MAX % 16)) )
         {
           res *= 16;
           res += digit;
@@ -504,7 +504,7 @@
   while (i < maxlen && (digit = toxdigitvalue (str[i])) >= 0)
     {
       if ( (res > (UINT32_MAX / 16)) ||
-           (res == (UINT32_MAX / 16) && digit > (UINT32_MAX % 16)) )
+           (res == (UINT32_MAX / 16) && (uint32_t)digit > (UINT32_MAX % 16)) )
         return 0;
 
       res *= 16;
@@ -541,7 +541,7 @@
   while (digit >= 0)
     {
       if ( (res < (UINT64_MAX / 16)) ||
-           (res == (UINT64_MAX / 16) && digit <= (UINT64_MAX % 16)) )
+           (res == (UINT64_MAX / 16) && (uint64_t)digit <= (UINT64_MAX % 16)) )
         {
           res *= 16;
           res += digit;
@@ -584,7 +584,7 @@
   while (i < maxlen && (digit = toxdigitvalue (str[i])) >= 0)
     {
       if ( (res > (UINT64_MAX / 16)) ||
-           (res == (UINT64_MAX / 16) && digit > (UINT64_MAX % 16)) )
+           (res == (UINT64_MAX / 16) && (uint64_t)digit > (UINT64_MAX % 16)) )
         return 0;
 
       res *= 16;




reply via email to

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