Commit 5ba01a5a authored by James Zern's avatar James Zern
Browse files

nestegg: quiet read related uint64->size_t warnings

ne_read_ebml_lacing / ne_read_discard_padding
+ add some asserts

Change-Id: I28d0ec5c8f901ae0a35928a8f512c51b3ecf177d
parent 9251ff3a
......@@ -20,3 +20,4 @@ nestegg.c|975 col 6| warning: ‘r’ may be used uninitialized in this function
- nestegg_packet_track: fix uint64->uint32 warning
- ne_read_(string|binary|block): normalize size_t usage
- ne_parse: normalize size_t usage
- quiet read related uint64->size_t warnings
......@@ -1152,7 +1152,8 @@ ne_read_ebml_lacing(nestegg_io * io, size_t block, size_t * read, uint64_t n, ui
r = ne_read_vint(io, &lace, &length);
if (r != 1)
return r;
*read += length;
assert(length <= 8);
*read += (size_t)length;
sizes[i] = lace;
sum = sizes[i];
......@@ -1164,7 +1165,8 @@ ne_read_ebml_lacing(nestegg_io * io, size_t block, size_t * read, uint64_t n, ui
r = ne_read_svint(io, &slace, &length);
if (r != 1)
return r;
*read += length;
assert(length <= 8);
*read += (size_t)length;
sizes[i] = sizes[i - 1] + slace;
sum += sizes[i];
i += 1;
......@@ -1408,7 +1410,8 @@ ne_read_discard_padding(nestegg * ctx, nestegg_packet * pkt)
if (!element)
return 1;
r = ne_read_simple(ctx, element, size);
assert((size_t)size == size);
r = ne_read_simple(ctx, element, (size_t)size);
if (r != 1)
return r;
storage = (struct ebml_type *) (ctx->ancestor->data + element->offset);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment