[all-commits] [llvm/llvm-project] 7edfbf: [lldb][DataFormatter] Fix format specifiers in Lib...

Michael Buch via All-commits all-commits at lists.llvm.org
Tue Mar 19 04:27:04 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7edfbf2af2253297f48ff8adaba99373f67e8dca
      https://github.com/llvm/llvm-project/commit/7edfbf2af2253297f48ff8adaba99373f67e8dca
  Author: Michael Buch <michaelbuch12 at gmail.com>
  Date:   2024-03-19 (Tue, 19 Mar 2024)

  Changed paths:
    M lldb/source/Plugins/Language/CPlusPlus/LibCxxSliceArray.cpp

  Log Message:
  -----------
  [lldb][DataFormatter] Fix format specifiers in LibCxxSliceArray summary provider (#85763)

This caused following warnings in an LLDB build:
```
[237/1072] Building CXX object tools/l...lusLanguage.dir/LibCxxSliceArray.cpp.o
/Volumes/Data/llvm-project/lldb/source/Plugins/Language/CPlusPlus/LibCxxSliceArray.cpp:38:53: warning: format specifies type 'unsigned long long' but the argument has type 'size_t' (aka 'unsigned long') [-Wformat]
   38 |   stream.Printf("stride=%" PRIu64 " size=%" PRIu64, stride, size);
      |                         ~~~~~~~~~                   ^~~~~~
/Volumes/Data/llvm-project/lldb/source/Plugins/Language/CPlusPlus/LibCxxSliceArray.cpp:38:61: warning: format specifies type 'unsigned long long' but the argument has type 'size_t' (aka 'unsigned long') [-Wformat]
   38 |   stream.Printf("stride=%" PRIu64 " size=%" PRIu64, stride, size);
      |                                          ~~~~~~~~~          ^~~~
2 warnings generated.
```

This patch simply changes the format specifiers to use the `%zu` for
`size_t`s.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list