Tool/software: Code Composer Studio
I want the compiler with option -Wall to compile warning free, but have a few errors that need to be ignored.
I think there should be a pragma that does this but find no documentation/ reference.
First specific example:
1) Code that will cause an alignment error. I want to cause the alignment error so this codes purpose is to test the error handling of misalignment during execution...
uint64_t *llp;
uint64_t addr;
addr = (uint64_t) &addr; -- warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
addr++;
llp = (uint64_t *)addr; -- warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
2) This code does not generate compiler warning but CCS shows the warning that case 1 does not have a break...
I dont want the break.. its okay to fall through case 1 to do code in case 2.
switch (option) {
case 1 :
doSomethingForCase1Only();
case 2 :
doSomethingForEitherCase1OrCase2()
break;
case 3:
doSomethingForCase3Only();
break;
}
}