|
Line 0
Link Here
|
|
|
1 |
--- iozone.c.orig 2016-07-16 17:05:13 UTC |
| 2 |
+++ iozone.c |
| 3 |
@@ -1916,7 +1916,7 @@ char **argv; |
| 4 |
break; |
| 5 |
case 's': /* Set file size */ |
| 6 |
#ifdef NO_PRINT_LLD |
| 7 |
- sscanf(optarg,"%ld",&kilobytes64); |
| 8 |
+ sscanf(optarg,"%ld",(long long *)&kilobytes64); |
| 9 |
#else |
| 10 |
sscanf(optarg,"%lld",&kilobytes64); |
| 11 |
#endif |
| 12 |
@@ -1940,7 +1940,7 @@ char **argv; |
| 13 |
min_file_size = (off64_t)s_range[0]; /* Make visable globally */ |
| 14 |
|
| 15 |
#ifdef NO_PRINT_LLD |
| 16 |
- sprintf(splash[splash_line++],"\tFile size set to %ld kB\n",kilobytes64); |
| 17 |
+ sprintf(splash[splash_line++],"\tFile size set to %ld kB\n",(long long )kilobytes64); |
| 18 |
#else |
| 19 |
sprintf(splash[splash_line++],"\tFile size set to %lld kB\n",kilobytes64); |
| 20 |
#endif |
| 21 |
@@ -2314,7 +2314,7 @@ char **argv; |
| 22 |
if(minimum_file_size < page_size/1024) |
| 23 |
minimum_file_size=(off64_t)(page_size/1024); |
| 24 |
#ifdef NO_PRINT_LLD |
| 25 |
- sprintf(splash[splash_line++],"\tUsing minimum file size of %ld kilobytes.\n",minimum_file_size); |
| 26 |
+ sprintf(splash[splash_line++],"\tUsing minimum file size of %ld (long long)kilobytes.\n",minimum_file_size); |
| 27 |
#else |
| 28 |
sprintf(splash[splash_line++],"\tUsing minimum file size of %lld kilobytes.\n",minimum_file_size); |
| 29 |
#endif |
| 30 |
@@ -2337,7 +2337,7 @@ char **argv; |
| 31 |
if(maximum_file_size < RECLEN_START/1024) |
| 32 |
maximum_file_size=(off64_t)(RECLEN_START/1024); |
| 33 |
#ifdef NO_PRINT_LLD |
| 34 |
- sprintf(splash[splash_line++],"\tUsing maximum file size of %ld kilobytes.\n",maximum_file_size); |
| 35 |
+ sprintf(splash[splash_line++],"\tUsing maximum file size of %ld (long long)kilobytes.\n",maximum_file_size); |
| 36 |
#else |
| 37 |
sprintf(splash[splash_line++],"\tUsing maximum file size of %lld kilobytes.\n",maximum_file_size); |
| 38 |
#endif |
| 39 |
@@ -2447,7 +2447,7 @@ char **argv; |
| 40 |
#ifdef NO_PRINT_LLD |
| 41 |
sscanf(subarg,"%ld",&burst_size_kb_64); |
| 42 |
#else |
| 43 |
- sscanf(subarg,"%lld",&burst_size_kb_64); |
| 44 |
+ sscanf(subarg,"%lld",(long long *)&burst_size_kb_64); |
| 45 |
#endif |
| 46 |
if(subarg[strlen(subarg)-1]=='k' || |
| 47 |
subarg[strlen(subarg)-1]=='K'){ |
| 48 |
@@ -3109,7 +3109,7 @@ char **argv; |
| 49 |
burst_size_kb_64, burst_sleep_duration_msec); |
| 50 |
#else |
| 51 |
printf("\tBurst size set to %lld Kbytes.\n\tBurst sleep duration set to %lld msec\n", |
| 52 |
- burst_size_kb_64, burst_sleep_duration_msec); |
| 53 |
+ (long long)burst_size_kb_64, burst_sleep_duration_msec); |
| 54 |
#endif |
| 55 |
if(!rflag) |
| 56 |
reclen=(long long)4096; |
| 57 |
@@ -3345,7 +3345,7 @@ long long reclength; |
| 58 |
if(!silent) printf("%8ld",reclen/1024); |
| 59 |
} |
| 60 |
#else |
| 61 |
- if(!silent) printf("%16lld",kilobytes64); |
| 62 |
+ if(!silent) printf("%16lld",(long long)kilobytes64); |
| 63 |
if(r_traj_flag || w_traj_flag) |
| 64 |
{ |
| 65 |
if(!silent) printf("%8lld",(long long )0); |
| 66 |
@@ -3403,7 +3403,7 @@ long long reclength; |
| 67 |
printf("\n\tiozone %ld %ld ", kilobytes64, goodrecl); |
| 68 |
printf("\t(i.e. record size = %ld bytes)\n", goodrecl); |
| 69 |
#else |
| 70 |
- printf("\n\tiozone %lld %lld ", kilobytes64, goodrecl); |
| 71 |
+ printf("\n\tiozone %lld %lld ", (long long)kilobytes64, goodrecl); |
| 72 |
printf("\t(i.e. record size = %lld bytes)\n", goodrecl); |
| 73 |
#endif |
| 74 |
} |
| 75 |
@@ -3544,7 +3544,7 @@ void auto_test() |
| 76 |
min_rec_size,min_file_size); |
| 77 |
#else |
| 78 |
printf("Error: record length %lld is greater than filesize %lld kB\n ", |
| 79 |
- min_rec_size,min_file_size); |
| 80 |
+ min_rec_size,(long long)min_file_size); |
| 81 |
#endif |
| 82 |
exit(23); |
| 83 |
} |
| 84 |
@@ -3749,7 +3749,7 @@ throughput_test() |
| 85 |
port,kilobytes64,reclen/1024); |
| 86 |
#else |
| 87 |
if(!silent) printf("\tEach %s writes a %lld kByte file in %lld kByte records\n", |
| 88 |
- port,kilobytes64,reclen/1024); |
| 89 |
+ port,(long long)kilobytes64,reclen/1024); |
| 90 |
#endif |
| 91 |
} |
| 92 |
|
| 93 |
@@ -7182,8 +7182,8 @@ char sverify; |
| 94 |
printf("where %8.8lx loop %ld\n",where,i); |
| 95 |
#else |
| 96 |
printf("Error in file: Found ?%llx? Expecting ?%llx? addr %lx\n",*where, (long long)((pattern_buf<<32)|pattern_buf),((long)where)); |
| 97 |
- printf("Error in file: Position %lld \n",file_position); |
| 98 |
- printf("Record # %lld Record size %lld kb \n",recnum,recsize/1024); |
| 99 |
+ printf("Error in file: Position %lld \n",(long long)file_position); |
| 100 |
+ printf("Record # %lld Record size %lld kb \n",(long long)recnum,recsize/1024); |
| 101 |
printf("where %px loop %lld\n",where,(long long)i); |
| 102 |
#endif |
| 103 |
return(1); |