If you have problems with your kernel ...
If you have problems with your kernel ...
If you write kernel in C and using GCC, try passing options -Wall -Werror to compiler. I helped me today to catch many bugs in kernel (e.g. valued passed to function in wrong order).
RE:If you have problems with your kernel ...
Sound advice. I make it a policy to do this on all my code. The -Werror isn't necessary. I believe I have the -Werror turned off right now in my CFLAGS. I turn it on when I'm finishing up a section of code, and I want to clean it up before moving on.
One case where pedantic error checking can be a problem is when I put in debugging DIE statements (which expand to an __attribute__((noreturn)) function call), and GCC is too helpful, complaining about code that will never be executed.
Warnings are your friends. When I work in C++, I use flags like -Weffc++.
Gnome
One case where pedantic error checking can be a problem is when I put in debugging DIE statements (which expand to an __attribute__((noreturn)) function call), and GCC is too helpful, complaining about code that will never be executed.
Warnings are your friends. When I work in C++, I use flags like -Weffc++.
Gnome