From: rlar Date: Wed, 16 Mar 2016 18:45:56 +0000 (+0100) Subject: warning: conversion to 'flex_uint32_t' from 'long unsigned int' may alter its value... X-Git-Tag: v2.6.2~43 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c2429b5a4a6a0e7030c36f75e16ec68923f32cc6;p=flex warning: conversion to 'flex_uint32_t' from 'long unsigned int' may alter its value [-Wconversion] struct yytbl_reader, member bread is of type flex_uint32_t --- diff --git a/src/flex.skl b/src/flex.skl index d94b075..4c7d322 100644 --- a/src/flex.skl +++ b/src/flex.skl @@ -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;