You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by jo...@apache.org on 2008/08/06 16:29:12 UTC
svn commit: r683278 - in /apr/apr/trunk/include: apr_strings.h apr_tables.h
Author: jorton
Date: Wed Aug 6 07:29:12 2008
New Revision: 683278
URL: http://svn.apache.org/viewvc?rev=683278&view=rev
Log:
* include/apr_strings.h (apr_pstrcat): Mark with sentinel attribute
for GCC >= 4; triggers a compiler warning if the function is called
without a final NULL argument.
* include/apr_tables.h (apr_table_do): Likewise.
Modified:
apr/apr/trunk/include/apr_strings.h
apr/apr/trunk/include/apr_tables.h
Modified: apr/apr/trunk/include/apr_strings.h
URL: http://svn.apache.org/viewvc/apr/apr/trunk/include/apr_strings.h?rev=683278&r1=683277&r2=683278&view=diff
==============================================================================
--- apr/apr/trunk/include/apr_strings.h (original)
+++ apr/apr/trunk/include/apr_strings.h Wed Aug 6 07:29:12 2008
@@ -136,7 +136,11 @@
* @param ... The strings to concatenate. The final string must be NULL
* @return The new string
*/
-APR_DECLARE_NONSTD(char *) apr_pstrcat(apr_pool_t *p, ...);
+APR_DECLARE_NONSTD(char *) apr_pstrcat(apr_pool_t *p, ...)
+#if defined(__GNUC__) && __GNUC__ >= 4
+ __attribute__((sentinel))
+#endif
+ ;
/**
* Concatenate multiple strings specified in a writev-style vector
Modified: apr/apr/trunk/include/apr_tables.h
URL: http://svn.apache.org/viewvc/apr/apr/trunk/include/apr_tables.h?rev=683278&r1=683277&r2=683278&view=diff
==============================================================================
--- apr/apr/trunk/include/apr_tables.h (original)
+++ apr/apr/trunk/include/apr_tables.h Wed Aug 6 07:29:12 2008
@@ -380,7 +380,11 @@
* @see apr_table_do_callback_fn_t
*/
APR_DECLARE_NONSTD(int) apr_table_do(apr_table_do_callback_fn_t *comp,
- void *rec, const apr_table_t *t, ...);
+ void *rec, const apr_table_t *t, ...)
+#if defined(__GNUC__) && __GNUC__ >= 4
+ __attribute__((sentinel))
+#endif
+ ;
/**
* Iterate over a table running the provided function once for every