From 6044fcec3e267b1f0e4658592fc39bc0093c1d32 Mon Sep 17 00:00:00 2001 From: James Zern Date: Mon, 3 Mar 2014 18:40:15 -0800 Subject: [PATCH] nestegg: ne_buffer_read: quiet uint64->size_t warning the buffer length is already a size_t making the offset into it limited Change-Id: Ibc5352e69049186cc07f7d86117696b11a98a600 --- third_party/nestegg/README.webm | 1 + third_party/nestegg/src/nestegg.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/third_party/nestegg/README.webm b/third_party/nestegg/README.webm index 4cf2e4d22..8e3760bd7 100644 --- a/third_party/nestegg/README.webm +++ b/third_party/nestegg/README.webm @@ -21,3 +21,4 @@ nestegg.c|975 col 6| warning: ‘r’ may be used uninitialized in this function - ne_read_(string|binary|block): normalize size_t usage - ne_parse: normalize size_t usage - quiet read related uint64->size_t warnings +- ne_buffer_read: quiet uint64->size_t warning diff --git a/third_party/nestegg/src/nestegg.c b/third_party/nestegg/src/nestegg.c index 124b98b3e..c7e2b024a 100644 --- a/third_party/nestegg/src/nestegg.c +++ b/third_party/nestegg/src/nestegg.c @@ -1605,7 +1605,7 @@ ne_buffer_read(void * buffer, size_t length, void * user_data) struct sniff_buffer * sb = user_data; int rv = 1; - size_t available = sb->length - sb->offset; + size_t available = sb->length - (size_t)sb->offset; if (available < length) return 0;