fsp icon indicating copy to clipboard operation
fsp copied to clipboard

add mising gcc warnings push

Open hathach opened this issue 1 year ago • 0 comments

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.

hathach avatar Jun 30 '23 10:06 hathach