]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Add a couple of GCC attribute tags to printf style functions. This also
authorRyan Bloom <rbb@apache.org>
Thu, 22 Feb 2001 04:05:58 +0000 (04:05 +0000)
committerRyan Bloom <rbb@apache.org>
Thu, 22 Feb 2001 04:05:58 +0000 (04:05 +0000)
fixes a couple of mismatched parameters highlighted revealed by the
attribute.
Submitted by:   Jon Travis <jtravis@covalent.net>

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88271 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
include/util_filter.h
modules/loggers/mod_log_config.c

diff --git a/CHANGES b/CHANGES
index dd6495b65eb7681edc9d8693aca27d7245c5335b..1f69989f8a71b90973c0aa6440135f0a2bdc996f 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,8 @@
 Changes with Apache 2.0.12-dev
 
+  *) Add a couple of GCC attribute tags to printf style functions.
+     [Jon Travis <jtravis@covalent.net>]
+
   *) Add the correct language tag for interoperation with the Taiwanese
      versions of MSIE and Netscape. [Clive Lin <clive@CirX.ORG>] PR#7142
 
index 33b27fdc146d1852392891d210450b54b70155bb..8a0140c20ca53996d26d9c378da9df7769b2d60f 100644 (file)
@@ -460,7 +460,8 @@ AP_DECLARE_NONSTD(int) ap_fputstrs(ap_filter_t *f, apr_bucket_brigade *bb, ...);
  * @param ... The argumets to use to fill out the format string
  * @deffunc int ap_fprintf(ap_filter_t *f, apr_bucket_brigade *bb, const char *fmt, ...)
  */
-AP_DECLARE_NONSTD(int) ap_fprintf(ap_filter_t *f, apr_bucket_brigade *bb, const char *fmt, ...);
+AP_DECLARE_NONSTD(int) ap_fprintf(ap_filter_t *f, apr_bucket_brigade *bb, const char *fmt, ...)
+        __attribute__((format(printf,3,4)));                                    
 
 #ifdef __cplusplus
 }
index 432059aecbf752e01c02722fbf1b5816b4c8b8c7..150babfbf62a66637a514899bcf53b5644395740 100644 (file)
@@ -490,13 +490,13 @@ static const char *log_request_time(request_rec *r, char *a)
 
 static const char *log_request_duration(request_rec *r, char *a)
 {
-    return apr_psprintf(r->pool, "%ld", (apr_time_now() - r->request_time) 
+    return apr_psprintf(r->pool, "%qd", (apr_time_now() - r->request_time) 
                                              / APR_USEC_PER_SEC);
 }
 
 static const char *log_request_duration_microseconds(request_rec *r, char *a)
 {
-    return apr_psprintf(r->pool, "%ld", (apr_time_now() - r->request_time));
+    return apr_psprintf(r->pool, "%qd", (apr_time_now() - r->request_time));
 }
 
 /* These next two routines use the canonical name:port so that log