Skip to content

Instantly share code, notes, and snippets.

@heatd
Created February 19, 2023 01:02
Show Gist options
  • Save heatd/3a0ba9c7710706d6298572018ef573a1 to your computer and use it in GitHub Desktop.
Save heatd/3a0ba9c7710706d6298572018ef573a1 to your computer and use it in GitHub Desktop.
`lib/ubsan/ubsan.cpp: In member function ‘small_string<36> val::to_string() const’:
lib/ubsan/ubsan.cpp:103:36: warning: format ‘%zd’ expects argument of type ‘signed size_t’, but argument 4 has type ‘ssize_t’ {aka ‘long int’} [-Wformat=]
103 | snprintf(s.buf, 36, "%zd", (ssize_t) val_);
| ~~^ ~~~~~~~~~~~~~~
| | |
| int ssize_t {aka long int}
| %ld
lib/ubsan/ubsan.cpp: In function ‘void ubsan_handle_shift_out_of_bounds(const ubsan_shift_oob_data*, ssize_t, ssize_t)’:
lib/ubsan/ubsan.cpp:396:34: warning: format ‘%zd’ expects argument of type ‘signed size_t’, but argument 2 has type ‘ssize_t’ {aka ‘long int’} [-Wformat=]
396 | printf("shift exponent %zd is negative\n", rhs);
| ~~^ ~~~
| | |
| int ssize_t {aka long int}
| %ld
lib/ubsan/ubsan.cpp:400:34: warning: format ‘%zu’ expects argument of type ‘size_t’, but argument 2 has type ‘ssize_t’ {aka ‘long int’} [-Wformat=]
400 | printf("shift exponent %zu is too large for %zu-bit type %s\n", rhs,
| ~~^ ~~~
| | |
| unsigned int ssize_t {aka long int}
| %lu
lib/ubsan/ubsan.cpp: In function ‘void __ubsan_handle_vla_bound_not_positive(ubsan_vla_bound_data*, ssize_t)’:
lib/ubsan/ubsan.cpp:549:39: warning: format ‘%zd’ expects argument of type ‘signed size_t’, but argument 2 has type ‘ssize_t’ {aka ‘long int’} [-Wformat=]
549 | printf("vla bound not positive (%zd)\n", val);
| ~~^ ~~~
| | |
| int ssize_t {aka long int}
| %ld
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment