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 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
* @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
}
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