Since v8.2.0 there are three new compiler warnings using GCC. Before there were none.
Nothing really serious but quite annoying:
1> src/lib/FreeRTOS/queue.c: In function 'xQueueGenericCreate':
1> src/lib/FreeRTOS/queue.c(343) :16: warning: cast increases required alignment of target type [-Wcast-align]
1> pxNewQueue = ( Queue_t * ) pcAllocatedBuffer; /lint !e826 MISRA The buffer cannot be to small because it was dimensioned by sizeof( Queue_t ) + xQueueSizeInBytes. /
1> ^
1> +++ compile: src/lib/FreeRTOS/tasks.c
1> src/lib/FreeRTOS/tasks.c: In function 'xTaskNotify':
1> src/lib/FreeRTOS/tasks.c(4056) :4: warning: switch missing default case [-Wswitch-default]
1> switch( eAction )
1> ^
1> src/lib/FreeRTOS/tasks.c: In function 'xTaskNotifyFromISR':
1> src/lib/FreeRTOS/tasks.c(4160) :4: warning: switch missing default case [-Wswitch-default]
1> switch( eAction )
1> ^
Please fix them!
Default cases are always good style, first warning can be avoided
[Do you realise you posted that about 3 minutes after V8.2.1 was uploaded!]
Generally for GCC we build with attempt a clearn (warning free) build with the options:
-Wall -Wextra
I believe with these options you should not receive any warnings. Unfortunately we cannot remove all warnings when the pedantic warning option is turned on.
Normally warnings are only seen from GCC when using the default compiler options used by Atmel Studio - which are quite eccentric, rather than just grouping warnings using the 'all' and 'extra' values.
That all said, we certainly can remove the second and third warnings - but I'm not sure how to remove the first (which is actually bogus, but the compiler has not way of knowing that). Feel free to make a suggestion on the first.
Actually, looking at it, the first two warnings are bogus too. There is a switch case for every possible value as it is a switch on a typedef enum. Adding a default case will probably generate more cases where a warning is emitted with a quite legitimate "unreachable code" warnings. For that reason I will close this bug as invalid.
Feel free to comment on options for curing the first warning though.
-Wswitch-default is used due to programming style.
A default case is always recommended to see in code reviews if all cases are covered.
This being said, I would suggest to change "case eNoAction:" with a comment to the default case.
Cleanest solution.
-Wcast-align
You are right, this is a little more difficult to solve cleanly. I think about it.