[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