Fixes warning with clang
Unified · Split
| @@ -94,11 +94,11 @@ static void check_output(FILE *fp) · 93 unmodified lines | |||
| 94 | if (size < 100) | 94 | if (size < 100) |
| 95 | fail("did not encode anything\n"); | 95 | fail("did not encode anything\n"); |
| 96 | 96 | ||
| 97 | char magic[4] = {0}; | 97 | char magic[4]; |
| 98 | fseek(fp, 0, SEEK_SET); | 98 | fseek(fp, 0, SEEK_SET); |
| 99 | fread(magic, sizeof(magic), 1, fp); | 99 | size_t ret = fread(magic, sizeof(magic), 1, fp); |
| 100 | static const char ebml_magic[] = {26, 69, 223, 163}; | 100 | static const char ebml_magic[] = {26, 69, 223, 163}; |
| 101 | if (memcmp(magic, ebml_magic, 4) != 0) | 101 | if (ret != 1 || memcmp(magic, ebml_magic, sizeof(magic)) != 0) |
| 102 | fail("output was not Matroska\n"); | 102 | fail("output was not Matroska\n"); |
| 103 | 103 | ||
| 104 | puts("output file ok"); | 104 | puts("output file ok"); |