Fix two compiler warnings
Change-Id: I2672003fc931bc4b6041ad99bc0c2a7afc7cafc6
diff --git a/obudec.c b/obudec.c
index d3443c4..6f60102 100644
--- a/obudec.c
+++ b/obudec.c
@@ -112,7 +112,7 @@
// Expand the buffer to contain the full OBU and its length.
const uint8_t *old_buffer = *buffer;
- *buffer = (uint8_t *)realloc(*buffer, *buffer_size + obu_size);
+ *buffer = (uint8_t *)realloc(*buffer, *buffer_size + (size_t)obu_size);
if (!*buffer) {
free((void *)old_buffer);
warn("OBU buffer alloc failed.\n");
@@ -121,7 +121,7 @@
data = *buffer + (*buffer_size);
*buffer_size += obu_size;
- ret = fread(data, 1, obu_size, infile);
+ ret = fread(data, 1, (size_t)obu_size, infile);
if (ret != obu_size) {
warn("Failed to read OBU.\n");