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 <campbell@blender.org>2022-11-09 04:28:34 +0300
committerCampbell Barton <campbell@blender.org>2022-11-09 04:32:08 +0300
commit3fa6aacb91f4a0d04c1ef3c67449df67696cea6b (patch)
tree58655e9595ffe191968dee34ea07a3b3762c4745
parent494385a5bcc4c08832b50ca57e21cf85981fe922 (diff)
Cleanup: add function attributes to BLI_sprintf
Quiet warning, suggesting to use attributes with GCC.
-rw-r--r--source/blender/blenlib/BLI_string.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/blenlib/BLI_string.h b/source/blender/blenlib/BLI_string.h
index fb02ea5fb17..ed15e0871b9 100644
--- a/source/blender/blenlib/BLI_string.h
+++ b/source/blender/blenlib/BLI_string.h
@@ -206,11 +206,12 @@ char *BLI_sprintfN(const char *__restrict format, ...) ATTR_WARN_UNUSED_RESULT
ATTR_NONNULL(1) ATTR_MALLOC ATTR_PRINTF_FORMAT(1, 2);
/**
- * A wrapper around ::sprintf() which does not generate security warnings.
+ * A wrapper around `::sprintf()` which does not generate security warnings.
*
- * \note Use BLI_snprintf for cases when the string size is known.
+ * \note Use #BLI_snprintf for cases when the string size is known.
*/
-int BLI_sprintf(char *__restrict str, const char *__restrict format, ...);
+int BLI_sprintf(char *__restrict str, const char *__restrict format, ...) ATTR_NONNULL(1, 2)
+ ATTR_PRINTF_FORMAT(2, 3);
/**
* This roughly matches C and Python's string escaping with double quotes - `"`.