You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The format attribute marks a variadic function as taking a format string and corresponding arguments which should be type-checked against the format string. Marking printf_, sprintf_, etc. this way allows compilers to issue warnings when the supplied arguments do not have the correct type, as they would for the standard library functions.
The code change is very small, and currently implemented in svkampen@ba025a5svkampen@d8aeaa9 (see comments below). I've guarded the __attribute__ declarations with #ifdef __GNUC__ ... #endif, so that they don't interfere with compilers that don't support them.
The text was updated successfully, but these errors were encountered:
Thanks, I must have glossed over that while reading the documentation... I've updated my branch - svkampen@d8aeaa9 now contains the attributes for all of the functions.
* Fixes#79.
* Fixed a few more (GCC) warnings.
* Separated the warning-triggering cases into test cases of their own.
* Not using `signed size_t` - that's apparently not in the standard and not widely supported.
* Added a CMake option for whether or not to test the warning-triggering cases.
The
format
attribute marks a variadic function as taking a format string and corresponding arguments which should be type-checked against the format string. Marking printf_, sprintf_, etc. this way allows compilers to issue warnings when the supplied arguments do not have the correct type, as they would for the standard library functions.The code change is very small, and currently implemented in
svkampen@ba025a5svkampen@d8aeaa9 (see comments below). I've guarded the__attribute__
declarations with#ifdef __GNUC__ ... #endif
, so that they don't interfere with compilers that don't support them.The text was updated successfully, but these errors were encountered: