diff options
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r-- | source/blender/blenlib/BLI_dynstr.h | 6 | ||||
-rw-r--r-- | source/blender/blenlib/BLI_string.h | 12 |
2 files changed, 15 insertions, 3 deletions
diff --git a/source/blender/blenlib/BLI_dynstr.h b/source/blender/blenlib/BLI_dynstr.h index c5158264e72..34e77007d95 100644 --- a/source/blender/blenlib/BLI_dynstr.h +++ b/source/blender/blenlib/BLI_dynstr.h @@ -75,7 +75,11 @@ void BLI_dynstr_nappend (DynStr *ds, const char *cstr, int len); * @param ds The DynStr to append to. * @param format The printf format string to use. */ -void BLI_dynstr_appendf (DynStr *ds, const char *format, ...); +void BLI_dynstr_appendf (DynStr *ds, const char *format, ...) +#ifdef __GNUC__ +__attribute__ ((format (printf, 2, 3))); +#endif +; void BLI_dynstr_vappendf (DynStr *ds, const char *format, va_list args); /** diff --git a/source/blender/blenlib/BLI_string.h b/source/blender/blenlib/BLI_string.h index 73178cd693f..01ad70c31fb 100644 --- a/source/blender/blenlib/BLI_string.h +++ b/source/blender/blenlib/BLI_string.h @@ -102,13 +102,21 @@ char *BLI_replacestr(char *str, const char *oldText, const char *newText); /* * Replacement for snprintf */ -int BLI_snprintf(char *buffer, size_t count, const char *format, ...); +int BLI_snprintf(char *buffer, size_t count, const char *format, ...) +#ifdef __GNUC__ +__attribute__ ((format (printf, 3, 4))); +#endif +; /* * Print formatted string into a newly mallocN'd string * and return it. */ -char *BLI_sprintfN(const char *format, ...); +char *BLI_sprintfN(const char *format, ...) +#ifdef __GNUC__ +__attribute__ ((format (printf, 1, 2))); +#endif +; /** * Compare two strings |