fsp
fsp copied to clipboard
add mising gcc warnings push
Fix missing gcc dianostic push. Before making changes to GCC warnings, we should always push first then pop afterwards. bsp_api.h
pop the diagnostic but doesn't push and mess up with the higher level warnings suppression e.g 'bsp_api.h' have a warnings when compiling with "-Wstrict-prototype" but application cannot suppress it using prama
#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstrict-prototypes"
#endif
#include "bsp_api.h"
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif
Since bsp_api.h will pop --> restore the diagnostic before "-Wstrict-prototypes" is ignored i.e it discards the application pragma.