Re: [RFA 01/22] Change selttest.c to use use std::vector

Simon Marchi
2016-09-30T14:38:28Z

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'.