[RFA 01/22] Change selttest.c to use use std::vector
Simon Marchi
simon.marchi@polymtl.ca
Fri Sep 30 14:43:00 GMT 2016
On 2016-09-27 00:08, Tom Tromey wrote:
> - printf_filtered (_("Ran %u unit tests, %d failed\n"),
> - VEC_length (self_test_function_ptr, tests), failed);
> + printf_filtered (_("Ran %lu unit tests, %d failed\n"),
> + tests.size (), failed);
This doesn't build on 32 bits:
selftest.c: In function âvoid run_self_tests()â:
selftest.c:62:27: error: format â%luâ expects argument of type âlong
unsigned intâ, but argument 2 has type âstd::vector<void
(*)()>::size_type {aka unsigned int}â [-Werror=format=]
tests.size (), failed);
^
I think the right format size specifier would be 'z'.
More information about the Gdb-patches
mailing list