summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRavishankar N <ravishankar@redhat.com>2018-08-16 08:16:54 +0530
committerAmar Tumballi <amarts@redhat.com>2018-08-20 03:02:29 +0000
commite924d76b125d50447535681e4525485379d45eeb (patch)
tree89473283f42a0a46f084868a6837fe73852604b4
parent4814140a539f4685bf439b456381751ee84be8fa (diff)
gnfs: fix gcc warnings
gcc version 8.1.1 20180712 (Red Hat 8.1.1-5) (GCC) on Fedora 28. Sample warnings: 1) nfs3.c:292:54: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size between 143 and 250 [-Wformat-truncation=] snprintf (buf, sizeof (buf), "(%s) %s : %s", \ ^~~~~~~~~~~~~~ nfs3.c:295:35: gfid); \ ~~~~ 2) nlm4.c:145:54: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size between 143 and 250 [-Wformat-truncation=] snprintf (buf, sizeof (buf), "(%s) %s : %s", \ ^~~~~~~~~~~~~~ nlm4.c:148:35: gfid); \ ~~~~ acl3.c:128:54: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size between 143 and 250 [-Wformat-truncation=] snprintf (buf, sizeof (buf), "(%s) %s : %s", \ ^~~~~~~~~~~~~~ acl3.c:131:35: gfid); \ ~~~~ updates: bz#1193929 Change-Id: I760b8176e48f1f4628a1a98afa54a7994bdf13e9 Signed-off-by: Ravishankar N <ravishankar@redhat.com>
-rw-r--r--xlators/nfs/server/src/acl3.c2
-rw-r--r--xlators/nfs/server/src/nfs3.c6
-rw-r--r--xlators/nfs/server/src/nlm4.c2
3 files changed, 5 insertions, 5 deletions
diff --git a/xlators/nfs/server/src/acl3.c b/xlators/nfs/server/src/acl3.c
index ec4b0e3dbbb..7cd29889280 100644
--- a/xlators/nfs/server/src/acl3.c
+++ b/xlators/nfs/server/src/acl3.c
@@ -118,7 +118,7 @@ nfs3_fh_to_xlator (struct nfs3_state *nfs3, struct nfs3_fh *fh);
#define acl3_check_fh_resolve_status(cst, nfstat, erlabl) \
do { \
xlator_t *xlatorp = NULL; \
- char buf[256], gfid[256]; \
+ char buf[256], gfid[GF_UUID_BUF_SIZE]; \
rpc_transport_t *trans = NULL; \
if ((cst)->resolve_ret < 0) { \
trans = rpcsvc_request_transport (cst->req); \
diff --git a/xlators/nfs/server/src/nfs3.c b/xlators/nfs/server/src/nfs3.c
index b62e24902c8..e9a52ba9392 100644
--- a/xlators/nfs/server/src/nfs3.c
+++ b/xlators/nfs/server/src/nfs3.c
@@ -258,7 +258,7 @@ out:
int auth_ret = 0; \
int auth_errno = 0; \
xlator_t *xlatorp = NULL; \
- char buf[256], gfid[256]; \
+ char buf[256], gfid[GF_UUID_BUF_SIZE]; \
rpc_transport_t *trans = NULL; \
\
auth_ret = auth_errno = \
@@ -282,7 +282,7 @@ out:
#define nfs3_check_fh_resolve_status(cst, nfstat, erlabl) \
do { \
xlator_t *xlatorp = NULL; \
- char buf[256], gfid[256]; \
+ char buf[256], gfid[GF_UUID_BUF_SIZE]; \
rpc_transport_t *trans = NULL; \
if ((cst)->resolve_ret < 0) { \
trans = rpcsvc_request_transport (cst->req); \
@@ -305,7 +305,7 @@ out:
#define nfs3_check_new_fh_resolve_status(cst, nfstat, erlabl) \
do { \
xlator_t *xlatorp = NULL; \
- char buf[256], gfid[256]; \
+ char buf[256], gfid[GF_UUID_BUF_SIZE]; \
rpc_transport_t *trans = NULL; \
if (((cst)->resolve_ret < 0) && \
((cst)->resolve_errno != ENOENT)) { \
diff --git a/xlators/nfs/server/src/nlm4.c b/xlators/nfs/server/src/nlm4.c
index 78965469d12..0c810689021 100644
--- a/xlators/nfs/server/src/nlm4.c
+++ b/xlators/nfs/server/src/nlm4.c
@@ -135,7 +135,7 @@ nfs3_fh_to_xlator (struct nfs3_state *nfs3, struct nfs3_fh *fh);
#define nlm4_check_fh_resolve_status(cst, nfstat, erlabl) \
do { \
xlator_t *xlatorp = NULL; \
- char buf[256], gfid[256]; \
+ char buf[256], gfid[GF_UUID_BUF_SIZE]; \
rpc_transport_t *trans = NULL; \
if ((cst)->resolve_ret < 0) { \
trans = rpcsvc_request_transport (cst->req); \