With so many target architectures and BSPs, I have come to be a bit less irritated that RTEMS is not warning free across all platforms. But it is a big job to address them all. I try to catch a warning and fix it, but GCC gets better and we add code faster than I remove them. Besides, it isn’t the job of a single person to remove warnings.
I am asking if anyone would like to help tackle warnings. Make the BSP you use warning free. If it already is, try to build another one and see how it goes.
This topic is to discuss how to get started, warnings that are not obvious to fix, etc.
This is Spring Community Cleanup!
2 Likes
It has been 11 months since I posted that. We managed to turn on -Werror with -Wall around August 2025 but had to disable some warnings. By October, all warnings from -Wall had been eliminated.
Of course, I wanted to continue pushing on the elimination of warnings. In September 2025, I did a trial run on -Wextra with the following results:
1 -Wexpansion-to-defined
3 -Wcalloc-transposed-args
3 -Wempty-body
4 -Wabsolute-value
4 -Wshift-negative-value
7 -Wenum-conversion
8 -Wignored-qualifiers
13 -Wclobbered
23 -Wcast-function-type
32 -Wold-style-declaration
66 -Wimplicit-fallthrough=
70 -Wtype-limits
139 -Wmissing-field-initializers
273 -Wunterminated-string-initialization
842 -Wsign-compare
3679 -Wunused-parameter
Today, there is an MR pending now which eliminates the last of the -Wextra warnings.
I am quite thrilled we reached this milestone. This has been a long slog even with generous help from other RTEMS maintainers. Doing this improves the RTEMS code base and will allow RTEMS 7.1 to be the first release with -Wall -Wextra -Werror enabled by default. I am hopeful this will help prevent the introduction of more warnings.
2 Likes