Commit 54e9f59e authored by Ryan Bloom's avatar Ryan Bloom
Browse files

Add a couple of GCC attribute tags to printf style functions. This also

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
parent 9574beb7
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
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

+2 −1
Original line number Diff line number Diff line
@@ -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
}
+2 −2
Original line number Diff line number Diff line
@@ -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