From 5310be8838f8db748a698bd3a98f8d00a4114e65 Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Tue, 18 Oct 2016 15:16:17 +0530 Subject: events: Add FMT_WARN for gf_event Raghavendra G found that posix is trying to print %s but passing an int when HEALTH_CHECK fails in posix. These are the kind of bugs that should be caught at compilation itself. Also fixed the problematic gf_event() callers. BUG: 1386097 Change-Id: Id7bd6d9a9690237cec3ca1aefa2aac085e8a1270 Signed-off-by: Pranith Kumar K Reviewed-on: http://review.gluster.org/15671 Smoke: Gluster Build System NetBSD-regression: NetBSD Build System Reviewed-by: Atin Mukherjee CentOS-regression: Gluster Build System --- cli/src/cli-cmd-volume.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cli/src/cli-cmd-volume.c') diff --git a/cli/src/cli-cmd-volume.c b/cli/src/cli-cmd-volume.c index c47c002c3f0..018814058a8 100644 --- a/cli/src/cli-cmd-volume.c +++ b/cli/src/cli-cmd-volume.c @@ -1061,7 +1061,7 @@ out: cli_out ("Volume add-brick failed"); } else { #if (USE_EVENTS) - gf_event (EVENT_VOLUME_ADD_BRICK, event_str); + gf_event (EVENT_VOLUME_ADD_BRICK, "%s", event_str); GF_FREE (event_str); #endif } @@ -2050,7 +2050,7 @@ out: } else { #if (USE_EVENTS) if (!event_ret) { - gf_event (event, event_str); + gf_event (event, "%s", event_str); GF_FREE (event_str); } #endif -- cgit