attempt to fix build
[pcsx_rearmed.git] / deps / libchdr / tests / benchmark.c
index 5c10bae..bace508 100644 (file)
@@ -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);