From 0da977423c2b7ea33389bc6e43c1e0491adbe1f0 Mon Sep 17 00:00:00 2001 From: Jeff Trawick Date: Wed, 28 Mar 2001 16:34:05 +0000 Subject: [PATCH] clean up some warnings dealing with 1) mismatches between printf format strings and arguments 2) wrong type for last parm to ap[r]_xml_to_text 3) missing time.h decls git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88603 13f79535-47bb-0310-9956-ffa450edef68 --- modules/dav/fs/lock.c | 6 ++++-- modules/dav/main/mod_dav.c | 2 +- modules/dav/main/mod_dav.h | 1 + modules/dav/main/util_lock.c | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/modules/dav/fs/lock.c b/modules/dav/fs/lock.c index 77db4bade0..cd7c43188d 100644 --- a/modules/dav/fs/lock.c +++ b/modules/dav/fs/lock.c @@ -712,7 +712,8 @@ static dav_error * dav_fs_load_lock_record(dav_lockdb *lockdb, dav_datum key, DAV_ERR_LOCK_CORRUPT_DB, apr_psprintf(p, "The lock database was found to " - "be corrupt. offset %i, c=%02x", + "be corrupt. offset %" + APR_SIZE_T_FMT ", c=%02x", offset, val.dptr[offset])); } } @@ -909,7 +910,8 @@ static dav_error * dav_fs_save_locknull_list(apr_pool_t *p, const char *dirpath, || amt != pbuf->cur_len) { err = dav_new_error(p, HTTP_INTERNAL_SERVER_ERROR, 0, apr_psprintf(p, - "Error writing %i bytes to %s", + "Error writing %" APR_SIZE_T_FMT + " bytes to %s", pbuf->cur_len, pathname)); } diff --git a/modules/dav/main/mod_dav.c b/modules/dav/main/mod_dav.c index b703871c69..bfa8d78029 100644 --- a/modules/dav/main/mod_dav.c +++ b/modules/dav/main/mod_dav.c @@ -3542,7 +3542,7 @@ static int dav_method_update(request_rec *r) int is_label = 0; int depth; int result; - int tsize; + apr_size_t tsize; const char *target; dav_response *multi_response; dav_error *err; diff --git a/modules/dav/main/mod_dav.h b/modules/dav/main/mod_dav.h index 6278624ce9..29a2c619b9 100644 --- a/modules/dav/main/mod_dav.h +++ b/modules/dav/main/mod_dav.h @@ -68,6 +68,7 @@ #include "util_xml.h" #include /* for INT_MAX */ +#include /* for time_t */ #ifdef __cplusplus extern "C" { diff --git a/modules/dav/main/util_lock.c b/modules/dav/main/util_lock.c index 46daff601e..e4c231aa71 100644 --- a/modules/dav/main/util_lock.c +++ b/modules/dav/main/util_lock.c @@ -173,7 +173,7 @@ const char *dav_lock_get_activelock(request_rec *r, dav_lock *lock, } else { time_t now = time(NULL); - sprintf(tmp, "Second-%lu", lock->timeout - now); + sprintf(tmp, "Second-%lu", (long unsigned int)(lock->timeout - now)); dav_buffer_append(p, pbuf, tmp); } -- 2.40.0