diff options
author | Niels de Vos <ndevos@redhat.com> | 2016-09-05 16:53:38 +0200 |
---|---|---|
committer | Kaleb KEITHLEY <kkeithle@redhat.com> | 2016-09-07 04:49:42 -0700 |
commit | 4f030852e3a4da367a948158cc8cf152e62bcee5 (patch) | |
tree | 15bdab7c8982da7864c9d5c425e9ee1286fdf1fe /cli | |
parent | 493281caf8398aa74c69fa85e341e4c0e3564017 (diff) |
build: correctly format some (s)size_t messages
On 32-bit builds the are are warnings like these:
posix.c:6438: warning: format '%ld' expects type 'long int', but argument 11 has type 'ssize_t'
Instead of using "%l" for (signed) size_t variables, "%z" should be
used.
Cherry picked from commit 3af889f02722f4636d2ea30570de6477e8b5a3a9:
> BUG: 1198849
> Change-Id: I6f57b5e8ea174dd9e3056aff5da685e497894ccf
> Signed-off-by: Niels de Vos <ndevos@redhat.com>
> Reviewed-on: http://review.gluster.org/14933
> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
> Smoke: Gluster Build System <jenkins@build.gluster.org>
This patch is not really recommended for backporting, but we do have a
new smoke test that fails when these warnings pop-up. It is cleaner to
correct the code in the release-3.7 branch then to modify the smoke test
to skip this branch.
Change-Id: I6f57b5e8ea174dd9e3056aff5da685e497894ccf
BUG: 1225842
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/15401
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Smoke: Gluster Build System <jenkins@build.gluster.org>
Diffstat (limited to 'cli')
-rw-r--r-- | cli/src/cli-rpc-ops.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cli/src/cli-rpc-ops.c b/cli/src/cli-rpc-ops.c index ea0a63bf748..5a3dcd52052 100644 --- a/cli/src/cli-rpc-ops.c +++ b/cli/src/cli-rpc-ops.c @@ -9749,7 +9749,7 @@ cli_populate_req_dict_for_delete (dict_t *snap_dict, dict_t *dict, size_t index) goto out; } - ret = snprintf (key, sizeof (key), "snapname%lu", index); + ret = snprintf (key, sizeof (key), "snapname%zu", index); if (ret < 0) { goto out; } |