From: Jeff Trawick Date: Tue, 15 Apr 2003 22:47:58 +0000 (+0000) Subject: fix some discrepancies between format strings and arguments, X-Git-Tag: pre_ajp_proxy~1846 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=013339e87d7a32209308c1984f009308d4566566;p=thirdparty%2Fapache%2Fhttpd.git fix some discrepancies between format strings and arguments, resolving some warnings on 64-bit systems git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@99374 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/http/http_core.c b/modules/http/http_core.c index f2878ae2a25..f2c51c9cda3 100644 --- a/modules/http/http_core.c +++ b/modules/http/http_core.c @@ -211,9 +211,8 @@ static apr_status_t chunk_filter(ap_filter_t *f, apr_bucket_brigade *b) * Insert the chunk header, specifying the number of bytes in * the chunk. */ - /* XXX might be nice to have APR_OFF_T_FMT_HEX */ hdr_len = apr_snprintf(chunk_hdr, sizeof(chunk_hdr), - "%qx" CRLF, (apr_uint64_t)bytes); + "%" APR_UINT64_T_HEX_FMT CRLF, (apr_uint64_t)bytes); ap_xlate_proto_to_ascii(chunk_hdr, hdr_len); e = apr_bucket_transient_create(chunk_hdr, hdr_len, c->bucket_alloc); diff --git a/modules/http/http_protocol.c b/modules/http/http_protocol.c index eac8daae11a..46fa3321278 100644 --- a/modules/http/http_protocol.c +++ b/modules/http/http_protocol.c @@ -2907,9 +2907,8 @@ AP_CORE_DECLARE_NONSTD(apr_status_t) ap_byterange_filter(ap_filter_t *f, if (ctx->num_ranges > 1) { /* Is ap_make_content_type required here? */ const char *orig_ct = ap_make_content_type(r, r->content_type); - /* need APR_TIME_T_FMT_HEX */ - ctx->boundary = apr_psprintf(r->pool, "%qx%lx", - r->request_time, (long) getpid()); + ctx->boundary = apr_psprintf(r->pool, "%" APR_UINT64_T_HEX_FMT "%lx", + (apr_uint64_t)r->request_time, (long) getpid()); ap_set_content_type(r, apr_pstrcat(r->pool, "multipart", use_range_x(r) ? "/x-" : "/", diff --git a/server/protocol.c b/server/protocol.c index 1985d505ae4..22d044e26a6 100644 --- a/server/protocol.c +++ b/server/protocol.c @@ -1100,9 +1100,9 @@ AP_DECLARE(void) ap_note_digest_auth_failure(request_rec *r) apr_table_setn(r->err_headers_out, (PROXYREQ_PROXY == r->proxyreq) ? "Proxy-Authenticate" : "WWW-Authenticate", - /* need APR_TIME_T_FMT_HEX */ - apr_psprintf(r->pool, "Digest realm=\"%s\", nonce=\"%llx\"", - ap_auth_name(r), r->request_time)); + apr_psprintf(r->pool, "Digest realm=\"%s\", nonce=\"" + "%" APR_UINT64_T_HEX_FMT "\"", + ap_auth_name(r), (apr_uint64_t)r->request_time)); } AP_DECLARE(int) ap_get_basic_auth_pw(request_rec *r, const char **pw)