summaryrefslogtreecommitdiffstats
path: root/xlators/storage/posix/src
diff options
context:
space:
mode:
authorYaniv Kaul <ykaul@redhat.com>2019-12-27 21:30:21 +0200
committerAmar Tumballi <amarts@gmail.com>2020-01-01 09:40:03 +0000
commit33453ec69af1070dd5e15dd99c14ebb43c4e88c2 (patch)
treea5fe66a046711c71fbb0f7e853d37ffbcad76175 /xlators/storage/posix/src
parentec3df84dcfd7ccda0a18fa75e3b425c090209adf (diff)
posix-inode-fd-ops.c: fix a compiler warning - real_path may be NULL
Fixes the following: posix-inode-fd-ops.c: In function ‘posix_common_removexattr’: ../../../../libglusterfs/src/glusterfs/logging.h:231:9: warning: ‘%s’ directive argument is null [-Wformat-overflow=] 231 | _gf_msg(dom, __FILE__, __FUNCTION__, __LINE__, level, errnum, 0, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 232 | msgid, ##fmt); \ | ~~~~~~~~~~~~~ posix-inode-fd-ops.c:4401:13: note: in expansion of macro ‘gf_msg’ 4401 | gf_msg(this->name, GF_LOG_WARNING, errno, P_MSG_FDSTAT_FAILED, | ^~~~~~ posix-inode-fd-ops.c:4402:47: note: format string is defined here 4402 | "fdstat operaton failed on %s", real_path); | ^~ Change-Id: I3f2278d3a05a569dde257d66f44a8655491b4013 updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
Diffstat (limited to 'xlators/storage/posix/src')
-rw-r--r--xlators/storage/posix/src/posix-inode-fd-ops.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/storage/posix/src/posix-inode-fd-ops.c b/xlators/storage/posix/src/posix-inode-fd-ops.c
index bd1279c..bbbc4e5 100644
--- a/xlators/storage/posix/src/posix-inode-fd-ops.c
+++ b/xlators/storage/posix/src/posix-inode-fd-ops.c
@@ -4509,7 +4509,7 @@ posix_common_removexattr(call_frame_t *frame, loc_t *loc, fd_t *fd,
ret = posix_fdstat(this, inode, _fd, &preop);
if (ret) {
gf_msg(this->name, GF_LOG_WARNING, errno, P_MSG_FDSTAT_FAILED,
- "fdstat operaton failed on %s", real_path);
+ "fdstat operaton failed on %s", real_path ? real_path : "");
}
}