Skip to content

Commit 44affc7

Browse files
committed
use %l instead of %z
1 parent a357670 commit 44affc7

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

exhal.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ int main (int argc, char **argv) {
6868
outputsize = unpack_from_file(infile, fileoffset, unpacked);
6969
} else {
7070
fprintf(stderr, "Error: Unable to decompress %s because an invalid offset was specified\n"
71-
" (must be between zero and 0x%X).\n", argv[1], ftell(infile));
71+
" (must be between zero and 0x%lX).\n", argv[1], ftell(infile));
7272
exit(-1);
7373
}
7474

@@ -81,10 +81,10 @@ int main (int argc, char **argv) {
8181
exit(-1);
8282
}
8383

84-
printf("Uncompressed size: %zu bytes\n", outputsize);
84+
printf("Uncompressed size: %lu bytes\n", (unsigned long)outputsize);
8585
} else {
8686
fprintf(stderr, "Error: Unable to decompress %s because the output would have been larger than\n"
87-
" 64 kb. The input at 0x%X is likely not valid compressed data.\n", argv[1], fileoffset);
87+
" 64 kb. The input at 0x%lX is likely not valid compressed data.\n", argv[1], (unsigned long)fileoffset);
8888
}
8989

9090
fclose(infile);

inhal.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ int main (int argc, char **argv) {
9494
fseek(infile, 0, SEEK_END);
9595
inputsize = ftell(infile);
9696

97-
printf("Uncompressed size: %zd bytes\n", inputsize);
97+
printf("Uncompressed size: %lu bytes\n", (unsigned long)inputsize);
9898

9999
if (inputsize > DATA_SIZE) {
100100
fprintf(stderr, "Error: File must be a maximum of 65,536 bytes!\n");
@@ -126,7 +126,7 @@ int main (int argc, char **argv) {
126126
exit(-1);
127127
}
128128

129-
printf("Compressed size: % zu bytes\n", outputsize);
129+
printf("Compressed size: %lu bytes\n", (unsigned long)outputsize);
130130
printf("Compression ratio: %4.2f%%\n", 100 * (double)outputsize / inputsize);
131131
printf("Compression time: %4.3f seconds\n\n", (double)time / CLOCKS_PER_SEC);
132132

0 commit comments

Comments
 (0)