diff options
| author | Josef Schlehofer <pepe.schlehofer@gmail.com> | 2026-06-09 11:45:00 +0200 |
|---|---|---|
| committer | Mark Wielaard <mark@klomp.org> | 2026-06-11 22:00:23 +0200 |
| commit | 33866efaf4b5e8d3ccdff89ba4af9e20955f4069 (patch) | |
| tree | a643d9bc8172fd93160f7d8e5ae4f54026d663ba | |
| parent | 35d122a3df8b0cc4082a4d89fdc6ee99f375fe67 (diff) | |
| download | bzip2-33866efaf4b5e8d3ccdff89ba4af9e20955f4069.tar.gz bzip2-33866efaf4b5e8d3ccdff89ba4af9e20955f4069.tar.bz2 bzip2-33866efaf4b5e8d3ccdff89ba4af9e20955f4069.zip | |
bzip2recover: Use standard %llu format specifier
Update the format specifier for unsigned long long in bzip2recover.c to use
the standard %llu instead of %Lu. Modern compilers (such as Clang) emit a format
warning when using the non-standard %Lu modifier.
Fixes:
bzip2recover.c:376:59: warning: length modifier 'L' results in undefined behavior or no effect with 'u' conversion specifier [-Wformat]
376 | fprintf ( stderr, " block %d runs from " MaybeUInt64_FMT
| ^~~~~~~~~~~~~~~
bzip2recover.c:40:29: note: expanded from macro 'MaybeUInt64_FMT'
40 | # define MaybeUInt64_FMT "%Lu"
| ~^~
bzip2recover.c:376:59: note: did you mean to use 'll'?
Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
| -rw-r--r-- | bzip2recover.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bzip2recover.c b/bzip2recover.c index 4b1c219..95adeeb 100644 --- a/bzip2recover.c +++ b/bzip2recover.c | |||
| @@ -37,7 +37,7 @@ | |||
| 37 | */ | 37 | */ |
| 38 | #ifdef __GNUC__ | 38 | #ifdef __GNUC__ |
| 39 | typedef unsigned long long int MaybeUInt64; | 39 | typedef unsigned long long int MaybeUInt64; |
| 40 | # define MaybeUInt64_FMT "%Lu" | 40 | # define MaybeUInt64_FMT "%llu" |
| 41 | #else | 41 | #else |
| 42 | #ifdef _MSC_VER | 42 | #ifdef _MSC_VER |
| 43 | typedef unsigned __int64 MaybeUInt64; | 43 | typedef unsigned __int64 MaybeUInt64; |
