Skip to content
Snippets Groups Projects
Commit 8f9f8802 authored by rswindell's avatar rswindell
Browse files

Catch (warn about) safe_snprintf() usage problems when building with GCC.

parent 29c909ca
Branches
Tags
No related merge requests found
......@@ -359,7 +359,11 @@ DLLEXPORT long double DLLCALL xp_timer(void);
DLLEXPORT char* DLLCALL os_version(char *str);
DLLEXPORT char* DLLCALL os_cmdshell(void);
DLLEXPORT char* DLLCALL lastchar(const char* str);
DLLEXPORT int DLLCALL safe_snprintf(char *dst, size_t size, const char *fmt, ...);
DLLEXPORT int DLLCALL safe_snprintf(char *dst, size_t size, const char *fmt, ...)
#if defined(__GNUC__) // Catch printf-format errors
__attribute__ ((format (printf, 3 , 4))); // 1 is 'this'
#endif
;
/* C string/char escape-sequence processing */
DLLEXPORT char* DLLCALL c_escape_str(const char* src, char* dst, size_t maxlen, BOOL ctrl_only);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment