diff options
author | Dimitry Andric <dimitry@andric.com> | 2021-11-23 21:06:45 +0100 |
---|---|---|
committer | Dimitry Andric <dimitry@andric.com> | 2021-11-24 21:48:17 +0100 |
commit | 187d9979f22e9e285d501b53c0978c1e80856fa1 (patch) | |
tree | a607ae1e74e5e375e877a97113d8894749cd32b0 /llvm/lib/ProfileData/Coverage/CoverageMappingReader.cpp | |
parent | 2897b67665d1fa1177531e78cc93b3704c5aea12 (diff) | |
download | llvm-187d9979f22e9e285d501b53c0978c1e80856fa1.zip llvm-187d9979f22e9e285d501b53c0978c1e80856fa1.tar.gz llvm-187d9979f22e9e285d501b53c0978c1e80856fa1.tar.bz2 |
cfi: fix more -Wformat warnings
Building cfi with recent clang on a 64-bit system results in the
following warnings:
compiler-rt/lib/cfi/cfi.cpp:233:64: warning: format specifies type 'void *' but the argument has type '__sanitizer::uptr' (aka 'unsigned long') [-Wformat]
VReport(1, "Can not handle: symtab > strtab (%p > %zx)\n", symtab, strtab);
~~ ^~~~~~
%lu
compiler-rt/lib/sanitizer_common/sanitizer_common.h:231:46: note: expanded from macro 'VReport'
if ((uptr)Verbosity() >= (level)) Report(__VA_ARGS__); \
^~~~~~~~~~~
compiler-rt/lib/cfi/cfi.cpp:253:59: warning: format specifies type 'void *' but the argument has type '__sanitizer::uptr' (aka 'unsigned long') [-Wformat]
VReport(1, "Can not handle: symtab %p, strtab %zx\n", symtab, strtab);
~~ ^~~~~~
%lu
compiler-rt/lib/sanitizer_common/sanitizer_common.h:231:46: note: expanded from macro 'VReport'
if ((uptr)Verbosity() >= (level)) Report(__VA_ARGS__); \
^~~~~~~~~~~
Since `__sanitizer::uptr` has the same size as `size_t`, consistently
use `%z` as a printf specifier.
Reviewed By: vitalybuka
Differential Revision: https://reviews.llvm.org/D114466
Diffstat (limited to 'llvm/lib/ProfileData/Coverage/CoverageMappingReader.cpp')
0 files changed, 0 insertions, 0 deletions