renesas / fsp

Flexible Software Package (FSP) for Renesas RA MCU Family
https://renesas.github.io/fsp/
Other
192 stars 82 forks source link

add mising gcc warnings push #278

Closed hathach closed 1 month ago

hathach commented 1 year ago

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.

renesas-abigail commented 1 month ago

Thank you for your pull request! This issue was fixed in FSP v5.0.0.