887953
From c86df7778fd1d93a74892f36fa6fec14d3d20707 Mon Sep 17 00:00:00 2001
887953
From: Amar Tumballi <amarts@redhat.com>
887953
Date: Wed, 10 Oct 2018 10:42:53 +0530
887953
Subject: [PATCH 400/404] all: fix the format warnings due to strict check
887953
887953
In the fix for CVE listed below, we added a strict format check,
887953
and that has revealed multiple issues with the formats. Fixed all
887953
warnings introduced because of the fix.
887953
887953
Updates: CVE-2018-14661
887953
887953
BUG: 1637084
887953
Change-Id: Ic1702b264fa4c8ad23d3836fcd1d6dc2ca8bc4b1
887953
Signed-off-by: Amar Tumballi <amarts@redhat.com>
887953
Reviewed-on: https://code.engineering.redhat.com/gerrit/152352
887953
Reviewed-by: Xavi Hernandez <xhernandez@redhat.com>
887953
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
887953
---
887953
 libglusterfs/src/fd.c                               |  2 +-
887953
 libglusterfs/src/inode.c                            |  2 +-
887953
 libglusterfs/src/iobuf.c                            |  8 ++++----
887953
 libglusterfs/src/stack.c                            |  6 +++---
887953
 libglusterfs/src/statedump.c                        | 11 ++++++-----
887953
 rpc/rpc-lib/src/rpc-drc.c                           |  4 ++--
887953
 xlators/cluster/dht/src/dht-shared.c                |  2 +-
887953
 xlators/cluster/stripe/src/stripe.c                 |  4 ++--
887953
 xlators/debug/trace/src/trace.c                     |  2 +-
887953
 xlators/features/quota/src/quota.c                  |  2 +-
887953
 xlators/mount/fuse/src/fuse-bridge.c                |  6 +++---
887953
 xlators/performance/io-cache/src/io-cache.c         |  4 ++--
887953
 xlators/performance/nl-cache/src/nl-cache-helper.c  |  6 +++---
887953
 xlators/performance/open-behind/src/open-behind.c   |  2 +-
887953
 xlators/performance/quick-read/src/quick-read.c     |  4 ++--
887953
 xlators/performance/read-ahead/src/read-ahead.c     |  6 ++----
887953
 xlators/performance/write-behind/src/write-behind.c |  6 +++---
887953
 xlators/protocol/client/src/client.c                |  2 +-
887953
 xlators/storage/posix/src/posix.c                   | 10 +++++-----
887953
 19 files changed, 44 insertions(+), 45 deletions(-)
887953
887953
diff --git a/libglusterfs/src/fd.c b/libglusterfs/src/fd.c
887953
index 27c8e13..ed80bd3 100644
887953
--- a/libglusterfs/src/fd.c
887953
+++ b/libglusterfs/src/fd.c
887953
@@ -1050,7 +1050,7 @@ fd_dump (fd_t *fd, char *prefix)
887953
                 return;
887953
 
887953
         memset(key, 0, sizeof(key));
887953
-        gf_proc_dump_write("pid", "%llu", fd->pid);
887953
+        gf_proc_dump_write("pid", "%" PRIu64, fd->pid);
887953
         gf_proc_dump_write("refcount", "%d", fd->refcount);
887953
         gf_proc_dump_write("flags", "%d", fd->flags);
887953
 
887953
diff --git a/libglusterfs/src/inode.c b/libglusterfs/src/inode.c
887953
index 1bc05a4..29d3c8f 100644
887953
--- a/libglusterfs/src/inode.c
887953
+++ b/libglusterfs/src/inode.c
887953
@@ -2415,7 +2415,7 @@ inode_table_dump (inode_table_t *itable, char *prefix)
887953
         }
887953
 
887953
         gf_proc_dump_build_key(key, prefix, "hashsize");
887953
-        gf_proc_dump_write(key, "%d", itable->hashsize);
887953
+        gf_proc_dump_write(key, "%"GF_PRI_SIZET, itable->hashsize);
887953
         gf_proc_dump_build_key(key, prefix, "name");
887953
         gf_proc_dump_write(key, "%s", itable->name);
887953
 
887953
diff --git a/libglusterfs/src/iobuf.c b/libglusterfs/src/iobuf.c
887953
index f6b8558..a22dbd3 100644
887953
--- a/libglusterfs/src/iobuf.c
887953
+++ b/libglusterfs/src/iobuf.c
887953
@@ -1169,7 +1169,7 @@ iobuf_arena_info_dump (struct iobuf_arena *iobuf_arena, const char *key_prefix)
887953
         gf_proc_dump_build_key(key, key_prefix, "alloc_cnt");
887953
         gf_proc_dump_write(key, "%"PRIu64, iobuf_arena->alloc_cnt);
887953
         gf_proc_dump_build_key(key, key_prefix, "max_active");
887953
-        gf_proc_dump_write(key, "%"PRIu64, iobuf_arena->max_active);
887953
+        gf_proc_dump_write(key, "%d", iobuf_arena->max_active);
887953
         gf_proc_dump_build_key(key, key_prefix, "page_size");
887953
         gf_proc_dump_write(key, "%"PRIu64, iobuf_arena->page_size);
887953
         list_for_each_entry (trav, &iobuf_arena->active.list, list) {
887953
@@ -1202,9 +1202,9 @@ iobuf_stats_dump (struct iobuf_pool *iobuf_pool)
887953
         }
887953
         gf_proc_dump_add_section("iobuf.global");
887953
         gf_proc_dump_write("iobuf_pool","%p", iobuf_pool);
887953
-        gf_proc_dump_write("iobuf_pool.default_page_size", "%d",
887953
-                                                iobuf_pool->default_page_size);
887953
-        gf_proc_dump_write("iobuf_pool.arena_size", "%d",
887953
+        gf_proc_dump_write("iobuf_pool.default_page_size", "%" GF_PRI_SIZET,
887953
+                           iobuf_pool->default_page_size);
887953
+        gf_proc_dump_write("iobuf_pool.arena_size", "%" GF_PRI_SIZET,
887953
                            iobuf_pool->arena_size);
887953
         gf_proc_dump_write("iobuf_pool.arena_cnt", "%d",
887953
                            iobuf_pool->arena_cnt);
887953
diff --git a/libglusterfs/src/stack.c b/libglusterfs/src/stack.c
887953
index d64ac8a..6fbd2bb 100644
887953
--- a/libglusterfs/src/stack.c
887953
+++ b/libglusterfs/src/stack.c
887953
@@ -144,7 +144,7 @@ gf_proc_dump_call_frame (call_frame_t *call_frame, const char *key_buf,...)
887953
 out:
887953
         if (ret) {
887953
                 gf_proc_dump_write("Unable to dump the frame information",
887953
-                                   "(Lock acquisition failed) %p", my_frame);
887953
+                                   "(Lock acquisition failed)");
887953
                 return;
887953
         }
887953
 }
887953
@@ -183,7 +183,7 @@ gf_proc_dump_call_stack (call_stack_t *call_stack, const char *key_buf,...)
887953
         gf_proc_dump_write("uid", "%d", call_stack->uid);
887953
         gf_proc_dump_write("gid", "%d", call_stack->gid);
887953
         gf_proc_dump_write("pid", "%d", call_stack->pid);
887953
-        gf_proc_dump_write("unique", "%Ld", call_stack->unique);
887953
+        gf_proc_dump_write("unique", "%" PRIu64, call_stack->unique);
887953
         gf_proc_dump_write("lk-owner", "%s", lkowner_utoa (&call_stack->lk_owner));
887953
 
887953
         if (call_stack->type == GF_OP_TYPE_FOP)
887953
@@ -222,7 +222,7 @@ gf_proc_dump_pending_frames (call_pool_t *call_pool)
887953
         gf_proc_dump_add_section("global.callpool");
887953
         section_added = _gf_true;
887953
         gf_proc_dump_write("callpool_address","%p", call_pool);
887953
-        gf_proc_dump_write("callpool.cnt","%d", call_pool->cnt);
887953
+        gf_proc_dump_write("callpool.cnt", "%" PRId64, call_pool->cnt);
887953
 
887953
 
887953
         list_for_each_entry (trav, &call_pool->all_frames, all_frames) {
887953
diff --git a/libglusterfs/src/statedump.c b/libglusterfs/src/statedump.c
887953
index e9ecef5..a123adb 100644
887953
--- a/libglusterfs/src/statedump.c
887953
+++ b/libglusterfs/src/statedump.c
887953
@@ -240,10 +240,11 @@ gf_proc_dump_xlator_mem_info (xlator_t *xl)
887953
                 gf_proc_dump_add_section ("%s.%s - usage-type %s memusage",
887953
                                           xl->type, xl->name,
887953
                                           xl->mem_acct->rec[i].typestr);
887953
-                gf_proc_dump_write ("size", "%u", xl->mem_acct->rec[i].size);
887953
+                gf_proc_dump_write ("size", "%" GF_PRI_SIZET,
887953
+                                    xl->mem_acct->rec[i].size);
887953
                 gf_proc_dump_write ("num_allocs", "%u",
887953
                                     xl->mem_acct->rec[i].num_allocs);
887953
-                gf_proc_dump_write ("max_size", "%u",
887953
+                gf_proc_dump_write ("max_size", "%" GF_PRI_SIZET,
887953
                                     xl->mem_acct->rec[i].max_size);
887953
                 gf_proc_dump_write ("max_num_allocs", "%u",
887953
                                     xl->mem_acct->rec[i].max_num_allocs);
887953
@@ -275,9 +276,9 @@ gf_proc_dump_xlator_mem_info_only_in_use (xlator_t *xl)
887953
                 gf_proc_dump_add_section ("%s.%s - usage-type %d", xl->type,
887953
                                           xl->name,i);
887953
 
887953
-                gf_proc_dump_write ("size", "%u",
887953
+                gf_proc_dump_write ("size", "%" GF_PRI_SIZET,
887953
                                     xl->mem_acct->rec[i].size);
887953
-                gf_proc_dump_write ("max_size", "%u",
887953
+                gf_proc_dump_write ("max_size", "%" GF_PRI_SIZET,
887953
                                     xl->mem_acct->rec[i].max_size);
887953
                 gf_proc_dump_write ("num_allocs", "%u",
887953
                                     xl->mem_acct->rec[i].num_allocs);
887953
@@ -475,7 +476,7 @@ gf_proc_dump_dict_info (glusterfs_ctx_t *ctx)
887953
         total_dicts = GF_ATOMIC_GET (ctx->stats.total_dicts_used);
887953
         total_pairs = GF_ATOMIC_GET (ctx->stats.total_pairs_used);
887953
 
887953
-        gf_proc_dump_write ("max-pairs-per-dict", "%u",
887953
+        gf_proc_dump_write ("max-pairs-per-dict", "%" PRIu64,
887953
                             GF_ATOMIC_GET (ctx->stats.max_dict_pairs));
887953
         gf_proc_dump_write ("total-pairs-used", "%lu", total_pairs);
887953
         gf_proc_dump_write ("total-dicts-used", "%lu", total_dicts);
887953
diff --git a/rpc/rpc-lib/src/rpc-drc.c b/rpc/rpc-lib/src/rpc-drc.c
887953
index fb7d2f1..f597432 100644
887953
--- a/rpc/rpc-lib/src/rpc-drc.c
887953
+++ b/rpc/rpc-lib/src/rpc-drc.c
887953
@@ -565,10 +565,10 @@ rpcsvc_drc_priv (rpcsvc_drc_globals_t *drc)
887953
         gf_proc_dump_write (key, "%d", drc->lru_factor);
887953
 
887953
         gf_proc_dump_build_key (key, "drc", "duplicate_request_count");
887953
-        gf_proc_dump_write (key, "%d", drc->cache_hits);
887953
+        gf_proc_dump_write (key, "%" PRIu64, drc->cache_hits);
887953
 
887953
         gf_proc_dump_build_key (key, "drc", "in_transit_duplicate_requests");
887953
-        gf_proc_dump_write (key, "%d", drc->intransit_hits);
887953
+        gf_proc_dump_write (key, "%" PRIu64, drc->intransit_hits);
887953
 
887953
         list_for_each_entry (client, &drc->clients_head, client_list) {
887953
                 gf_proc_dump_build_key (key, "client", "%d.ip-address", i);
887953
diff --git a/xlators/cluster/dht/src/dht-shared.c b/xlators/cluster/dht/src/dht-shared.c
887953
index 2f0d8ce..4aef8ff 100644
887953
--- a/xlators/cluster/dht/src/dht-shared.c
887953
+++ b/xlators/cluster/dht/src/dht-shared.c
887953
@@ -179,7 +179,7 @@ dht_priv_dump (xlator_t *this)
887953
                                             conf->du_stats[i].avail_inodes);
887953
 
887953
                         snprintf (key, sizeof (key), "du_stats[%d].log", i);
887953
-                        gf_proc_dump_write (key, "%lu",
887953
+                        gf_proc_dump_write (key, "%" PRIu32,
887953
                                             conf->du_stats[i].log);
887953
                 }
887953
         }
887953
diff --git a/xlators/cluster/stripe/src/stripe.c b/xlators/cluster/stripe/src/stripe.c
887953
index 67006ab..6b32f7f 100644
887953
--- a/xlators/cluster/stripe/src/stripe.c
887953
+++ b/xlators/cluster/stripe/src/stripe.c
887953
@@ -5688,12 +5688,12 @@ stripe_priv_dump (xlator_t *this)
887953
         options = priv->pattern;
887953
         while (options != NULL) {
887953
                 gf_proc_dump_write ("path_pattern", "%s", priv->pattern->path_pattern);
887953
-                gf_proc_dump_write ("options_block_size", "%ul", options->block_size);
887953
+                gf_proc_dump_write ("options_block_size", "%" PRIu64, options->block_size);
887953
 
887953
                 options = options->next;
887953
         }
887953
 
887953
-        gf_proc_dump_write ("block_size", "%ul", priv->block_size);
887953
+        gf_proc_dump_write ("block_size", "%" PRIu64, priv->block_size);
887953
         gf_proc_dump_write ("nodes-down", "%d", priv->nodes_down);
887953
         gf_proc_dump_write ("first-child_down", "%d", priv->first_child_down);
887953
         gf_proc_dump_write ("xattr_supported", "%d", priv->xattr_supported);
887953
diff --git a/xlators/debug/trace/src/trace.c b/xlators/debug/trace/src/trace.c
887953
index 34ac4ca..602e130 100644
887953
--- a/xlators/debug/trace/src/trace.c
887953
+++ b/xlators/debug/trace/src/trace.c
887953
@@ -68,7 +68,7 @@ dump_history_trace (circular_buffer_t *cb, void *data)
887953
                   ".%"GF_PRI_SUSECONDS, cb->tv.tv_usec);
887953
         gf_proc_dump_write ("TIME", "%s", timestr);
887953
 
887953
-        gf_proc_dump_write ("FOP", "%s\n", cb->data);
887953
+        gf_proc_dump_write ("FOP", "%s\n", (char *)cb->data);
887953
 
887953
         return 0;
887953
 }
887953
diff --git a/xlators/features/quota/src/quota.c b/xlators/features/quota/src/quota.c
887953
index 3d68ffa..71068d3 100644
887953
--- a/xlators/features/quota/src/quota.c
887953
+++ b/xlators/features/quota/src/quota.c
887953
@@ -5224,7 +5224,7 @@ quota_priv_dump (xlator_t *this)
887953
         if (!priv)
887953
                 goto out;
887953
 
887953
-        gf_proc_dump_add_section ("xlators.features.quota.priv", this->name);
887953
+        gf_proc_dump_add_section ("xlators.features.quota.priv");
887953
 
887953
         ret = TRY_LOCK (&priv->lock);
887953
         if (ret)
887953
diff --git a/xlators/mount/fuse/src/fuse-bridge.c b/xlators/mount/fuse/src/fuse-bridge.c
887953
index 1c4f4e4..fbb4c53 100644
887953
--- a/xlators/mount/fuse/src/fuse-bridge.c
887953
+++ b/xlators/mount/fuse/src/fuse-bridge.c
887953
@@ -5148,11 +5148,11 @@ fuse_priv_dump (xlator_t  *this)
887953
                             private->proto_minor);
887953
         gf_proc_dump_write("volfile", "%s",
887953
                             private->volfile?private->volfile:"None");
887953
-        gf_proc_dump_write("volfile_size", "%d",
887953
+        gf_proc_dump_write("volfile_size", "%" GF_PRI_SIZET,
887953
                             private->volfile_size);
887953
         gf_proc_dump_write("mount_point", "%s",
887953
                             private->mount_point);
887953
-        gf_proc_dump_write("iobuf", "%u",
887953
+        gf_proc_dump_write("iobuf", "%p",
887953
                             private->iobuf);
887953
         gf_proc_dump_write("fuse_thread_started", "%d",
887953
                             (int)private->fuse_thread_started);
887953
@@ -5208,7 +5208,7 @@ dump_history_fuse (circular_buffer_t *cb, void *data)
887953
                   ".%"GF_PRI_SUSECONDS, cb->tv.tv_usec);
887953
         gf_proc_dump_write ("TIME", "%s", timestr);
887953
 
887953
-        gf_proc_dump_write ("message", "%s\n", cb->data);
887953
+        gf_proc_dump_write ("message", "%s\n", (char *)cb->data);
887953
 
887953
         return 0;
887953
 }
887953
diff --git a/xlators/performance/io-cache/src/io-cache.c b/xlators/performance/io-cache/src/io-cache.c
887953
index 700d8c2..de44ad2 100644
887953
--- a/xlators/performance/io-cache/src/io-cache.c
887953
+++ b/xlators/performance/io-cache/src/io-cache.c
887953
@@ -2065,8 +2065,8 @@ ioc_priv_dump (xlator_t *this)
887953
                 gf_proc_dump_write ("cache_used", "%ld", priv->cache_used);
887953
                 gf_proc_dump_write ("inode_count", "%u", priv->inode_count);
887953
                 gf_proc_dump_write ("cache_timeout", "%u", priv->cache_timeout);
887953
-                gf_proc_dump_write ("min-file-size", "%u", priv->min_file_size);
887953
-                gf_proc_dump_write ("max-file-size", "%u", priv->max_file_size);
887953
+                gf_proc_dump_write ("min-file-size", "%" PRIu64, priv->min_file_size);
887953
+                gf_proc_dump_write ("max-file-size", "%" PRIu64, priv->max_file_size);
887953
         }
887953
         pthread_mutex_unlock (&priv->table_lock);
887953
 out:
887953
diff --git a/xlators/performance/nl-cache/src/nl-cache-helper.c b/xlators/performance/nl-cache/src/nl-cache-helper.c
887953
index 583d67b..b6f1a17 100644
887953
--- a/xlators/performance/nl-cache/src/nl-cache-helper.c
887953
+++ b/xlators/performance/nl-cache/src/nl-cache-helper.c
887953
@@ -1192,14 +1192,14 @@ nlc_dump_inodectx (xlator_t *this, inode_t *inode)
887953
 
887953
                 gf_proc_dump_write ("state", "%"PRIu64, nlc_ctx->state);
887953
                 gf_proc_dump_write ("timer", "%p", nlc_ctx->timer);
887953
-                gf_proc_dump_write ("cache-time", "%lld", nlc_ctx->cache_time);
887953
+                gf_proc_dump_write ("cache-time", "%" GF_PRI_TIME, nlc_ctx->cache_time);
887953
                 gf_proc_dump_write ("cache-size", "%zu", nlc_ctx->cache_size);
887953
                 gf_proc_dump_write ("refd-inodes", "%"PRIu64, nlc_ctx->refd_inodes);
887953
 
887953
                 if (IS_PE_VALID (nlc_ctx->state))
887953
                         list_for_each_entry_safe (pe, tmp, &nlc_ctx->pe, list) {
887953
-                                gf_proc_dump_write ("pe", "%p, %s", pe,
887953
-                                                    pe->inode, pe->name);
887953
+                                gf_proc_dump_write ("pe", "%p, %p, %s", (void *)pe,
887953
+                                                    (void *)pe->inode, pe->name);
887953
                         }
887953
 
887953
                 if (IS_NE_VALID (nlc_ctx->state))
887953
diff --git a/xlators/performance/open-behind/src/open-behind.c b/xlators/performance/open-behind/src/open-behind.c
887953
index 2d77f2d..3245c8f 100644
887953
--- a/xlators/performance/open-behind/src/open-behind.c
887953
+++ b/xlators/performance/open-behind/src/open-behind.c
887953
@@ -933,7 +933,7 @@ ob_fdctx_dump (xlator_t *this, fd_t *fd)
887953
         gf_proc_dump_write ("open_frame", "%p", ob_fd->open_frame);
887953
 
887953
         if (ob_fd->open_frame)
887953
-                gf_proc_dump_write ("open_frame.root.unique", "%p",
887953
+                gf_proc_dump_write ("open_frame.root.unique", "%" PRIu64,
887953
                                     ob_fd->open_frame->root->unique);
887953
 
887953
 	gf_proc_dump_write ("loc.path", "%s", ob_fd->loc.path);
887953
diff --git a/xlators/performance/quick-read/src/quick-read.c b/xlators/performance/quick-read/src/quick-read.c
887953
index ca228b8..e377ac3 100644
887953
--- a/xlators/performance/quick-read/src/quick-read.c
887953
+++ b/xlators/performance/quick-read/src/quick-read.c
887953
@@ -796,7 +796,7 @@ qr_priv_dump (xlator_t *this)
887953
 
887953
         gf_proc_dump_add_section ("%s", key_prefix);
887953
 
887953
-        gf_proc_dump_write ("max_file_size", "%d", conf->max_file_size);
887953
+        gf_proc_dump_write ("max_file_size", "%" PRIu64, conf->max_file_size);
887953
         gf_proc_dump_write ("cache_timeout", "%d", conf->cache_timeout);
887953
 
887953
         if (!table) {
887953
@@ -811,7 +811,7 @@ qr_priv_dump (xlator_t *this)
887953
         }
887953
 
887953
         gf_proc_dump_write ("total_files_cached", "%d", file_count);
887953
-        gf_proc_dump_write ("total_cache_used", "%d", total_size);
887953
+        gf_proc_dump_write ("total_cache_used", "%" PRIu64, total_size);
887953
 
887953
 out:
887953
         return 0;
887953
diff --git a/xlators/performance/read-ahead/src/read-ahead.c b/xlators/performance/read-ahead/src/read-ahead.c
887953
index 74ddf49..e02ca9f 100644
887953
--- a/xlators/performance/read-ahead/src/read-ahead.c
887953
+++ b/xlators/performance/read-ahead/src/read-ahead.c
887953
@@ -808,7 +808,6 @@ ra_fdctx_dump (xlator_t *this, fd_t *fd)
887953
         int32_t       ret      = 0, i = 0;
887953
         uint64_t      tmp_file = 0;
887953
         char         *path     = NULL;
887953
-        char          key[GF_DUMP_MAX_BUF_LEN]        = {0, };
887953
         char          key_prefix[GF_DUMP_MAX_BUF_LEN] = {0, };
887953
 
887953
 	fd_ctx_get (fd, this, &tmp_file);
887953
@@ -849,8 +848,7 @@ ra_fdctx_dump (xlator_t *this, fd_t *fd)
887953
 
887953
         for (page = file->pages.next; page != &file->pages;
887953
              page = page->next) {
887953
-                sprintf (key, "page[%d]", i);
887953
-                gf_proc_dump_write (key, "%p", page[i++]);
887953
+                gf_proc_dump_write ("page", "%d: %p", i++, (void *)page);
887953
 		ra_page_dump (page);
887953
         }
887953
 
887953
@@ -1075,7 +1073,7 @@ ra_priv_dump (xlator_t *this)
887953
         if (ret)
887953
                 goto out;
887953
         {
887953
-                gf_proc_dump_write ("page_size", "%d", conf->page_size);
887953
+                gf_proc_dump_write ("page_size", "%" PRIu64, conf->page_size);
887953
                 gf_proc_dump_write ("page_count", "%d", conf->page_count);
887953
                 gf_proc_dump_write ("force_atime_update", "%d",
887953
                                     conf->force_atime_update);
887953
diff --git a/xlators/performance/write-behind/src/write-behind.c b/xlators/performance/write-behind/src/write-behind.c
887953
index ef02e18..d655843 100644
887953
--- a/xlators/performance/write-behind/src/write-behind.c
887953
+++ b/xlators/performance/write-behind/src/write-behind.c
887953
@@ -2765,8 +2765,8 @@ wb_priv_dump (xlator_t *this)
887953
 
887953
         gf_proc_dump_add_section ("%s", key_prefix);
887953
 
887953
-        gf_proc_dump_write ("aggregate_size", "%d", conf->aggregate_size);
887953
-        gf_proc_dump_write ("window_size", "%d", conf->window_size);
887953
+        gf_proc_dump_write ("aggregate_size", "%" PRIu64, conf->aggregate_size);
887953
+        gf_proc_dump_write ("window_size", "%" PRIu64, conf->window_size);
887953
         gf_proc_dump_write ("flush_behind", "%d", conf->flush_behind);
887953
         gf_proc_dump_write ("trickling_writes", "%d", conf->trickling_writes);
887953
 
887953
@@ -2798,7 +2798,7 @@ __wb_dump_requests (struct list_head *head, char *prefix)
887953
 		else
887953
 			gf_proc_dump_write ("wound", "no");
887953
 
887953
-                gf_proc_dump_write ("generation-number", "%d", req->gen);
887953
+                gf_proc_dump_write ("generation-number", "%" PRIu64, req->gen);
887953
 
887953
                 gf_proc_dump_write ("req->op_ret", "%d", req->op_ret);
887953
                 gf_proc_dump_write ("req->op_errno", "%d", req->op_errno);
887953
diff --git a/xlators/protocol/client/src/client.c b/xlators/protocol/client/src/client.c
887953
index 674f1aa..1e69977 100644
887953
--- a/xlators/protocol/client/src/client.c
887953
+++ b/xlators/protocol/client/src/client.c
887953
@@ -2859,7 +2859,7 @@ client_priv_dump (xlator_t *this)
887953
 
887953
         list_for_each_entry(tmp, &conf->saved_fds, sfd_pos) {
887953
                 sprintf (key, "fd.%d.remote_fd", i);
887953
-                gf_proc_dump_write(key, "%d", tmp->remote_fd);
887953
+                gf_proc_dump_write(key, "%" PRId64, tmp->remote_fd);
887953
                 client_fd_lk_ctx_dump (this, tmp->lk_ctx, i);
887953
                 i++;
887953
         }
887953
diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c
887953
index 7bfe780..e46fe99 100644
887953
--- a/xlators/storage/posix/src/posix.c
887953
+++ b/xlators/storage/posix/src/posix.c
887953
@@ -6970,11 +6970,11 @@ posix_priv (xlator_t *this)
887953
         if (!priv)
887953
                 return 0;
887953
 
887953
-        gf_proc_dump_write("base_path","%s", priv->base_path);
887953
-        gf_proc_dump_write("base_path_length","%d", priv->base_path_length);
887953
-        gf_proc_dump_write("max_read","%d", priv->read_value);
887953
-        gf_proc_dump_write("max_write","%d", priv->write_value);
887953
-        gf_proc_dump_write("nr_files","%ld", priv->nr_files);
887953
+        gf_proc_dump_write("base_path", "%s", priv->base_path);
887953
+        gf_proc_dump_write("base_path_length", "%d", priv->base_path_length);
887953
+        gf_proc_dump_write("max_read", "%" PRId64, priv->read_value);
887953
+        gf_proc_dump_write("max_write", "%" PRId64, priv->write_value);
887953
+        gf_proc_dump_write("nr_files", "%ld", priv->nr_files);
887953
 
887953
         return 0;
887953
 }
887953
-- 
887953
1.8.3.1
887953