Closed alperenguclu closed 6 months ago
Which GCC version are you compiling with?
arm-none-eabi-gcc.exe (GNU Arm Embedded Toolchain 10.3-2021.10) 10.3.1 20210824 (release)
Strange, -Wstrict-prototypes
shouldn't be enabled by default... I don't see the warning on my machine or any of the build auto-testers, but if I manually enable it I see tons of warnings on other functions as well.
Does the flag show up explicitly in a verbose build for you? You can check with grep:
make distclean && make VERBOSE=1 | grep -- "-Wstrict-prototypes"
The fix is pretty trivial, we just need to add void
to any functions with empty args. i.e.
-static inline void _mxc_crit_get_state()
+static inline void _mxc_crit_get_state(void)
Just curious how/why you're seeing the flag enabled.
Yes, Jake, we are working on a Security project that will be integrated to Maxim SDK and we are using the -Wstrict-prototypes. I guess it will be nice to add void to functions with no args.
I am receiving following warnings in the mxc_sys.h file, and this issue seems to be present in most microcontrollers.
mxc_sys.h:220:20: warning: function declaration isn't a prototype [-Wstrict-prototypes]
220 | static inline void _mxc_crit_get_state()
mxc_sys.h:351:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]
351 | int MXC_SYS_RTCClockDisable();