apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jor...@apache.org
Subject svn commit: r683278 - in /apr/apr/trunk/include: apr_strings.h apr_tables.h
Date Wed, 06 Aug 2008 14:29:12 GMT
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



Mime
View raw message