From e31b6dc03ca464de55ebb403fb0ef6470d99e1a0 Mon Sep 17 00:00:00 2001 From: gabrielstedman Date: Mon, 22 Apr 2019 10:35:29 +0100 Subject: [PATCH] FR #598 - Make fileSize unsigned long long --- lib/lz4frame.h | 4 ++-- programs/lz4io.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/lz4frame.h b/lib/lz4frame.h index 5945647..8c07e86 100644 --- a/lib/lz4frame.h +++ b/lib/lz4frame.h @@ -196,10 +196,10 @@ typedef struct { typedef struct { LZ4F_frameInfo_t frameInfo; const char* fileName; - unsigned long fileSize; + unsigned long long fileSize; } LZ4F_compFileInfo_t; -#define LZ4F_INIT_FILEINFO { (LZ4F_frameInfo_t) LZ4F_INIT_FRAMEINFO, NULL, 0UL } +#define LZ4F_INIT_FILEINFO { (LZ4F_frameInfo_t) LZ4F_INIT_FRAMEINFO, NULL, 0ULL } /*-********************************* * Simple compression function diff --git a/programs/lz4io.c b/programs/lz4io.c index 070e22a..9aa2b94 100644 --- a/programs/lz4io.c +++ b/programs/lz4io.c @@ -1340,10 +1340,10 @@ int LZ4IO_displayCompressedFilesInfo(const char** inFileNames, const size_t ifnI } if(cfinfo.frameInfo.contentSize){ ratio = (double)cfinfo.fileSize / cfinfo.frameInfo.contentSize; - DISPLAY("%-16d\t%-20lu\t%-20llu\t%-8.4f\t%s\n",cfinfo.frameInfo.blockChecksumFlag,cfinfo.fileSize,cfinfo.frameInfo.contentSize, ratio, cfinfo.fileName); + DISPLAY("%-16d\t%-20llu\t%-20llu\t%-8.4f\t%s\n",cfinfo.frameInfo.blockChecksumFlag,cfinfo.fileSize,cfinfo.frameInfo.contentSize, ratio, cfinfo.fileName); } else{ - DISPLAY("%-16d\t%-20lu\t%-20s\t%-10s\t%s\n",cfinfo.frameInfo.blockChecksumFlag,cfinfo.fileSize, "-", "-", cfinfo.fileName); + DISPLAY("%-16d\t%-20llu\t%-20s\t%-10s\t%s\n",cfinfo.frameInfo.blockChecksumFlag,cfinfo.fileSize, "-", "-", cfinfo.fileName); } } return op_result; -- 2.7.4