summaryrefslogtreecommitdiffstats
path: root/cli
diff options
context:
space:
mode:
authorMichael Scherer <misc@redhat.com>2017-05-05 16:01:36 +0200
committerJeff Darcy <jeff@pl.atyp.us>2017-05-10 12:34:00 +0000
commit27b04b6c487e789074eb10c93be0f7d4f58fa945 (patch)
tree18b522f61b7ce02dae7c5320633d25bc1cccccad /cli
parent9df83b504a01e86d3b73af6c40df0c94cd2cd97a (diff)
Fix 'flush' type, coverity warning
As getchar returna a int, (which is 4 bytes on most common platforms, and at least 2 bytes), and char being often 1 byte, the conversion would lose information, hence the warning. Change-Id: I5b0b39c636ff49ef5c15d51a7f798e21635eca06 BUG: 789278 Signed-off-by: Michael Scherer <misc@redhat.com> Reviewed-on: https://review.gluster.org/17193 Tested-by: Michael Scherer <misc@fedoraproject.org> Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Prashanth Pai <ppai@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Zhou Zhengping <johnzzpcrystal@gmail.com> Reviewed-by: Jeff Darcy <jeff@pl.atyp.us>
Diffstat (limited to 'cli')
-rw-r--r--cli/src/cli-cmd-volume.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cli/src/cli-cmd-volume.c b/cli/src/cli-cmd-volume.c
index 5f07a05..61b6b20 100644
--- a/cli/src/cli-cmd-volume.c
+++ b/cli/src/cli-cmd-volume.c
@@ -407,7 +407,7 @@ gf_answer_t
cli_cmd_get_confirmation (struct cli_state *state, const char *question)
{
char answer[5] = {'\0', };
- char flush = '\0';
+ int flush = '\0';
size_t len;
if (state->mode & GLUSTER_MODE_SCRIPT)