X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=deps%2Flibchdr%2Ftests%2Fbenchmark.c;h=bace508c7f3299d8cf401a7f991024b694ddb9da;hb=5459088bf71ee4da726a70f191d301da2a121910;hp=5c10bae827ce720b028638606831b06666bc3182;hpb=022a8aadb40248408cefb1c8a513d23a593d6630;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);