shithub: openh264

Download patch

ref: 80bfc43df55dd8812da3eedf6d1ee96235891733
parent: 44013d4cd5d3efd3aa189d3271a02cd70da63e94
author: Martin Storsjö <[email protected]>
date: Fri Nov 7 06:24:30 EST 2014

Check the return value of fread

This silences warnings on linux/gcc.

--- a/test/decoder/DecUT_DecExt.cpp
+++ b/test/decoder/DecUT_DecExt.cpp
@@ -130,7 +130,7 @@
   iFileSize = (int32_t) ftell (pH264File);
   fseek (pH264File, 0L, SEEK_SET);
   pBuf = new uint8_t[iFileSize + 4];
-  fread (pBuf, 1, iFileSize, pH264File);
+  ASSERT_EQ(fread (pBuf, 1, iFileSize, pH264File), (unsigned int) iFileSize);
   memcpy (pBuf + iFileSize, &uiStartCode[0], 4); //confirmed_safe_unsafe_usage
   while (true) {
     if (iBufPos >= iFileSize) {