From: Joe Orton Date: Fri, 12 Dec 2003 12:36:50 +0000 (+0000) Subject: Fix format string warnings from gcc on amd64: X-Git-Tag: pre_ajp_proxy~936 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4de16bd525ed0d6080997299ad04ccb16ae7fd37;p=apache Fix format string warnings from gcc on amd64: * modules/ssl/ssl_scache_dbm.c (ssl_scache_dbm_store): Print apr_size_t using APR_SIZE_T_FMT. * modules/ssl/ssl_engine_io.c (ssl_filter_write): Print difference between sizes using APR_SSIZE_T_FMT, apr_size_t using APR_SIZE_T_FMT. * modules/proxy/proxy_http.c (ap_proxy_http_request): Print apr_uint64_t using APR_UINT64_T_HEX_FMT. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102037 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/proxy/proxy_http.c b/modules/proxy/proxy_http.c index aab0661390..18bc5a8819 100644 --- a/modules/proxy/proxy_http.c +++ b/modules/proxy/proxy_http.c @@ -700,7 +700,8 @@ apr_status_t ap_proxy_http_request(apr_pool_t *p, request_rec *r, apr_brigade_length(input_brigade, 1, &bytes); 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, diff --git a/modules/ssl/ssl_engine_io.c b/modules/ssl/ssl_engine_io.c index f3160cc2b7..717a589d53 100644 --- a/modules/ssl/ssl_engine_io.c +++ b/modules/ssl/ssl_engine_io.c @@ -832,7 +832,8 @@ static apr_status_t ssl_filter_write(ap_filter_t *f, } ap_log_error(APLOG_MARK, APLOG_INFO, outctx->rc, c->base_server, - "failed to write %d of %d bytes (%s)", + "failed to write %" APR_SSIZE_T_FMT + " of %" APR_SIZE_T_FMT " bytes (%s)", len - (apr_size_t)res, len, reason); outctx->rc = APR_EGENERAL; diff --git a/modules/ssl/ssl_scache_dbm.c b/modules/ssl/ssl_scache_dbm.c index 126185a66a..ee8f1c8672 100644 --- a/modules/ssl/ssl_scache_dbm.c +++ b/modules/ssl/ssl_scache_dbm.c @@ -147,8 +147,9 @@ BOOL ssl_scache_dbm_store(server_rec *s, UCHAR *id, int idlen, time_t expiry, SS /* streamline session data */ if ((nData = i2d_SSL_SESSION(sess, NULL)) > sizeof(ucaData)) { ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, - "streamline session data size too large: %d > %d", - nData, sizeof(ucaData)); + "streamline session data size too large: %d > " + "%" APR_SIZE_T_FMT, + nData, sizeof(ucaData)); return FALSE; } ucp = ucaData;