diff options
author | Christian Göttsche <cgzones@googlemail.com> | 2022-06-03 23:42:22 +0200 |
---|---|---|
committer | BenBE <BenBE@geshi.org> | 2022-06-23 00:07:01 +0200 |
commit | 393796d75da57983710f8bfdacd272f773fad47b (patch) | |
tree | 7d268227c7329cf3eff9251956797b8812c50ce0 /OpenFilesScreen.c | |
parent | 611ea4606f8538abf9c3db839f13c52dbc3a9605 (diff) |
Fix format specifier warning on 32 bit
OpenFilesScreen.c:229:65: error: format specifies type 'unsigned long long' but the argument has type '__off_t' (aka 'long') [-Werror,-Wformat]
xSnprintf(fileSizeBuf, sizeof(fileSizeBuf), "%"PRIu64, st.st_size); /* st.st_size is long long on macOS, long on linux */
~~~~~~~~ ^~~~~~~~~~
Diffstat (limited to 'OpenFilesScreen.c')
-rw-r--r-- | OpenFilesScreen.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/OpenFilesScreen.c b/OpenFilesScreen.c index 787e17b9..4256575c 100644 --- a/OpenFilesScreen.c +++ b/OpenFilesScreen.c @@ -226,7 +226,7 @@ static OpenFiles_ProcessData* OpenFilesScreen_getProcessData(pid_t pid) { struct stat st; if (stat(filename, &st) == 0) { char fileSizeBuf[21]; /* 20 (long long) + 1 (NULL) */ - xSnprintf(fileSizeBuf, sizeof(fileSizeBuf), "%"PRIu64, st.st_size); /* st.st_size is long long on macOS, long on linux */ + xSnprintf(fileSizeBuf, sizeof(fileSizeBuf), "%"PRIu64, (uint64_t)st.st_size); /* st.st_size is long long on macOS, long on linux */ free_and_xStrdup(&item->data[fileSizeIndex], fileSizeBuf); } } |