Fixes warning with clang
Showing the changes to test (1 of 1 file). Show all
Unified · Split
| @@ -94,11 +94,11 @@ static void check_output(FILE *fp) · 93 unmodified lines | ||
| 94 | 94 | if (size < 100) |
| 95 | 95 | fail("did not encode anything\n"); |
| 96 | 96 | |
| 97 | − char magic[4] = {0}; | |
| 97 | + char magic[4]; | |
| 98 | 98 | fseek(fp, 0, SEEK_SET); |
| 99 | − fread(magic, sizeof(magic), 1, fp); | |
| 99 | + size_t ret = fread(magic, sizeof(magic), 1, fp); | |
| 100 | 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 | 102 | fail("output was not Matroska\n"); |
| 103 | 103 | |
| 104 | 104 | puts("output file ok"); |