summaryrefslogtreecommitdiff
path: root/lib/test_scanf.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2021-09-06 10:24:58 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2021-09-06 10:24:58 -0700
commit1476ff21abb435cd4c453e61df5b125fac8cc50b (patch)
tree83e1566f2cf3ac83b93a3393a4a4610620f158c1 /lib/test_scanf.c
parent1dbe7e386f505bdae30f7436c41769149c7dcf32 (diff)
iwl: fix debug printf format strings
The variable 'package_size' is an unsigned long, and should be printed out using '%lu', not '%zd' (that would be for a size_t). Yes, on many architectures (including x86-64), 'size_t' is in fact the same type as 'long', but that's a fairly random architecture definition, and on some platforms 'size_t' is in fact 'int' rather than 'long'. That is the case on traditional 32-bit x86. Yes, both types are the exact same 32-bit size, and it would all print out perfectly correctly, but '%zd' ends up still being wrong. And we can't make 'package_size' be a 'size_t', because we get the actual value using efivar_entry_get() that takes a pointer to an 'unsigned long'. So '%lu' it is. This fixes two of the i386 allmodconfig build warnings (that is now an error due to -Werror). Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'lib/test_scanf.c')
0 files changed, 0 insertions, 0 deletions