I notice that this:
printf ("should be long unsigned: %lu\n", 42);
generates a nice warning:
one_wire_slave.c:358:9: error: format ‘%lu’ expects argument of
type ‘long unsigned int’, but argument 2 has type ‘int’
[-Werror=format=]
printf ("should be long unsigned: %lu\n", 42);
^
cc1: all warnings being treated as errors
but this:
printf_P (PSTR ("should be long unsigned: %lu\n"), 42);
doesn't.
Might it be possible to make printf_P generate that sort of warning
also by adding a function attribute?
Britton
_______________________________________________
AVR-chat mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/avr-chat