Overridden Safeties

Things like ignoring failing tests, disabling or ignoring compiler safeting warnings/errors can lead to bugs or errors.

For example, compiling the following with warnings disabled vs. all warnings enabled with gcc 8.3.0 (example from https://www.rapidtables.com/code/linux/gcc/gcc-wall.htmlhere)

// myfile.c
#include <stdio.h>

int main()
{
    printf("Program run!\n");
    int i=10;
}
...
gcc myfile.c       // no warnings given
gcc -Wall myfile.c // warning: unused variable 'i' [-Wunused-variable]

Though I am dissapointed it didn't say anything about not returning a value from int main. If you're feeling really strict, compile with gcc -Wall -Werror to have compilation fail completely if any warnings are present.



bj 2019-09-22