summaryrefslogtreecommitdiff
path: root/include/asterisk/strings.h
diff options
context:
space:
mode:
authorKevin P. Fleming <kpfleming@digium.com>2008-11-29 17:57:39 +0000
committerKevin P. Fleming <kpfleming@digium.com>2008-11-29 17:57:39 +0000
commit887e28d7aa9a324b065b85550e94008fc0727cb7 (patch)
tree63088090cdb36c744acc52f3439a1da53cb5422d /include/asterisk/strings.h
parent9a7c28cd5aeb577740ccb37e9e740a177223a762 (diff)
incorporates r159808 from branches/1.4:
------------------------------------------------------------------------ r159808 | kpfleming | 2008-11-29 10:58:29 -0600 (Sat, 29 Nov 2008) | 7 lines update dev-mode compiler flags to match the ones used by default on Ubuntu Intrepid, so all developers will see the same warnings and errors since this branch already had some printf format attributes, enable checking for them and tag functions that didn't have them format attributes in a consistent way ------------------------------------------------------------------------ in addition: move some format attributes from main/utils.c to the header files they belong in, and fix up references to the relevant functions based on new compiler warnings git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@159818 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include/asterisk/strings.h')
-rw-r--r--include/asterisk/strings.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/include/asterisk/strings.h b/include/asterisk/strings.h
index 7c25ecd5e..43d5bfc41 100644
--- a/include/asterisk/strings.h
+++ b/include/asterisk/strings.h
@@ -217,7 +217,7 @@ void ast_copy_string(char *dst, const char *src, size_t size),
\retval 0 on success
\retval non-zero on failure.
*/
-int ast_build_string(char **buffer, size_t *space, const char *fmt, ...) __attribute__ ((format (printf, 3, 4)));
+int ast_build_string(char **buffer, size_t *space, const char *fmt, ...) __attribute__((format(printf, 3, 4)));
/*!
\brief Build a string in a buffer, designed to be called repeatedly
@@ -231,7 +231,7 @@ int ast_build_string(char **buffer, size_t *space, const char *fmt, ...) __attri
\param fmt printf-style format string
\param ap varargs list of arguments for format
*/
-int ast_build_string_va(char **buffer, size_t *space, const char *fmt, va_list ap) __attribute__((format (printf, 3, 0)));
+int ast_build_string_va(char **buffer, size_t *space, const char *fmt, va_list ap) __attribute__((format(printf, 3, 0)));
/*!
* \brief Make sure something is true.
@@ -597,8 +597,8 @@ enum {
* through calling one of the other functions or macros defined in this
* file.
*/
-int __ast_str_helper(struct ast_str **buf, size_t max_len,
- int append, const char *fmt, va_list ap);
+int __attribute__((format(printf, 4, 0))) __ast_str_helper(struct ast_str **buf, size_t max_len,
+ int append, const char *fmt, va_list ap);
/*!
* \brief Set a dynamic string from a va_list
@@ -638,7 +638,7 @@ int __ast_str_helper(struct ast_str **buf, size_t max_len,
* }
* \endcode
*/
-AST_INLINE_API(int ast_str_set_va(struct ast_str **buf, size_t max_len, const char *fmt, va_list ap),
+AST_INLINE_API(int __attribute__((format(printf, 3, 0))) ast_str_set_va(struct ast_str **buf, size_t max_len, const char *fmt, va_list ap),
{
return __ast_str_helper(buf, max_len, 0, fmt, ap);
}
@@ -649,7 +649,7 @@ AST_INLINE_API(int ast_str_set_va(struct ast_str **buf, size_t max_len, const ch
*
* Same as ast_str_set_va(), but append to the current content.
*/
-AST_INLINE_API(int ast_str_append_va(struct ast_str **buf, size_t max_len, const char *fmt, va_list ap),
+AST_INLINE_API(int __attribute__((format(printf, 3, 0))) ast_str_append_va(struct ast_str **buf, size_t max_len, const char *fmt, va_list ap),
{
return __ast_str_helper(buf, max_len, 1, fmt, ap);
}
@@ -673,7 +673,7 @@ AST_INLINE_API(int ast_str_append_va(struct ast_str **buf, size_t max_len, const
* All the rest is the same as ast_str_set_va()
*/
AST_INLINE_API(
-int __attribute__ ((format (printf, 3, 4))) ast_str_set(
+int __attribute__((format(printf, 3, 4))) ast_str_set(
struct ast_str **buf, size_t max_len, const char *fmt, ...),
{
int res;
@@ -694,7 +694,7 @@ int __attribute__ ((format (printf, 3, 4))) ast_str_set(
* ast_str_set(), but the new data is appended to the current value.
*/
AST_INLINE_API(
-int __attribute__ ((format (printf, 3, 4))) ast_str_append(
+int __attribute__((format(printf, 3, 4))) ast_str_append(
struct ast_str **buf, size_t max_len, const char *fmt, ...),
{
int res;