]> granicus.if.org Git - flex/commitdiff
warning: conversion to 'flex_uint32_t' from 'long unsigned int' may alter its value...
authorrlar <rlar>
Wed, 16 Mar 2016 18:45:56 +0000 (19:45 +0100)
committerWill Estes <westes575@gmail.com>
Fri, 18 Mar 2016 18:46:43 +0000 (14:46 -0400)
struct yytbl_reader, member bread is of type flex_uint32_t

src/flex.skl

index d94b0751d64ce6070bab7e510ef86e0ea36e91d0..4c7d3227d29cc32b54b4872c810b5525dad168a1 100644 (file)
@@ -3110,7 +3110,7 @@ static int yytbl_read8 (void *v, struct yytbl_reader * rd)
         errno = EIO;
         return -1;
     }
-    rd->bread += sizeof(flex_uint8_t);
+    rd->bread += (flex_uint32_t) sizeof(flex_uint8_t);
     return 0;
 }
 
@@ -3122,7 +3122,7 @@ static int yytbl_read16 (void *v, struct yytbl_reader * rd)
         return -1;
     }
     *((flex_uint16_t *) v) = ntohs (*((flex_uint16_t *) v));
-    rd->bread += sizeof(flex_uint16_t);
+    rd->bread += (flex_uint32_t) sizeof(flex_uint16_t);
     return 0;
 }
 
@@ -3134,7 +3134,7 @@ static int yytbl_read32 (void *v, struct yytbl_reader * rd)
         return -1;
     }
     *((flex_uint32_t *) v) = ntohl (*((flex_uint32_t *) v));
-    rd->bread += sizeof(flex_uint32_t);
+    rd->bread += (flex_uint32_t) sizeof(flex_uint32_t);
     return 0;
 }
 
@@ -3177,7 +3177,7 @@ static int yytbl_hdr_read YYFARGS2(struct yytbl_hdr *, th, struct yytbl_reader *
         return -1;
     }
     else
-        rd->bread += bytes;
+        rd->bread += (flex_uint32_t) bytes;
 
     th->th_name = th->th_version + strlen (th->th_version) + 1;
     return 0;