X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=deps%2Flibchdr%2Ftests%2Fbenchmark.c;h=bace508c7f3299d8cf401a7f991024b694ddb9da;hb=722c138352884b520a28363e62f4d5c09a361a5d;hp=5c10bae827ce720b028638606831b06666bc3182;hpb=b24e7fced81a43e2b992f8615bd61c545884cbf2;p=pcsx_rearmed.git diff --git a/deps/libchdr/tests/benchmark.c b/deps/libchdr/tests/benchmark.c index 5c10bae8..bace508c 100644 --- a/deps/libchdr/tests/benchmark.c +++ b/deps/libchdr/tests/benchmark.c @@ -9,7 +9,7 @@ int main(int argc, char** argv) chd_file* file; const chd_header* header; void* buffer; - int i; + unsigned int i; unsigned int totalbytes; clock_t start, end; double time_taken; @@ -22,7 +22,10 @@ int main(int argc, char** argv) /* Sequential read all hunks */ err = chd_open(argv[1], CHD_OPEN_READ, NULL, &file); if (err) - printf("\nchd_open() error: %s", chd_error_string(err)); + { + printf("\nchd_open() error: %s", chd_error_string(err)); + return 0; + } header = chd_get_header(file); totalbytes = header->hunkbytes * header->totalhunks; buffer = malloc(header->hunkbytes);