From e0c08c41c59e7a41079cb9f63a502427b3abf118 Mon Sep 17 00:00:00 2001 From: Joseph Hickey Date: Mon, 14 Jun 2021 11:37:34 -0400 Subject: [PATCH] Fix #50, add printf conversion casts Cast ssize_t to long and uint32 to unsigned long for printf. This matches the %d and %lX conversions, respectively. --- cfe_ts_crc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cfe_ts_crc.c b/cfe_ts_crc.c index 0e9695a..6b9ac70 100644 --- a/cfe_ts_crc.c +++ b/cfe_ts_crc.c @@ -154,8 +154,8 @@ int main(int argc, char **argv) /* print the size/CRC results */ printf("\nTable File Name: %s\nTable Size: %ld Bytes\nExpected TS Validation CRC: " - "0x%08X\n\n", - argv[1], fileSize, fileCRC); + "0x%08lX\n\n", + argv[1], (long)fileSize, (unsigned long)fileCRC); /* Close file and check*/ if (close(fd) != 0)