Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-12-04 14:44:56 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-12-04 14:44:56 +0300
commit0271ad6322775de43f0c3f790f070b975861aa7d (patch)
tree4c2cc979df62437344d13efa69e50c13ca948d8f /source/blender/blenlib/BLI_string.h
parent471d304df1492e95c611b2d5666d7befeac27272 (diff)
Give functions that use printf style formatting GCC format attributes so if incorrect formatting is used the compiler will warn of this.
found & fixed 2x incorrect formatting args.
Diffstat (limited to 'source/blender/blenlib/BLI_string.h')
-rw-r--r--source/blender/blenlib/BLI_string.h12
1 files changed, 10 insertions, 2 deletions
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