summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPranith Kumar K <pkarampu@redhat.com>2017-11-27 15:07:05 +0530
committerXavier Hernandez <jahernan@redhat.com>2017-11-30 12:22:00 +0000
commit7ae126dcd967a953a64102a96de8e0678331e548 (patch)
treedfd6977c0adbd1951096448c6bb29e0f643a365b
parenteb013e4c180014238c95d58f67246ff19b40c437 (diff)
heal: Fix coverity scan dead-code report
Got following kind of scan issues: *** CID 1382469: (DEADCODE) /heal/src/glfs-heal.c: 1749 in main() 1744 break; 1745 case GF_SHD_OP_SBRAIN_HEAL_FROM_BRICK: 1746 ret = glfsh_heal_from_brick (fs, top_subvol, &rootloc, 1747 hostname, path, file); 1748 break; >>> CID 1382469: (DEADCODE) >>> Execution cannot reach this statement: "case GF_SHD_OP_INVALID:". Change-Id: I184da785893cb3e281b21f2d4fcdd2e5452102e6 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
-rw-r--r--heal/src/glfs-heal.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/heal/src/glfs-heal.c b/heal/src/glfs-heal.c
index 277ac9bb52d..10d00e6d737 100644
--- a/heal/src/glfs-heal.c
+++ b/heal/src/glfs-heal.c
@@ -1749,17 +1749,7 @@ main (int argc, char **argv)
ret = glfsh_heal_from_brick (fs, top_subvol, &rootloc,
hostname, path, file);
break;
- case GF_SHD_OP_INVALID:
- case GF_SHD_OP_HEAL_INDEX:
- case GF_SHD_OP_HEAL_FULL:
- case GF_SHD_OP_HEALED_FILES:
- case GF_SHD_OP_HEAL_FAILED_FILES:
- case GF_SHD_OP_STATISTICS:
- case GF_SHD_OP_STATISTICS_HEAL_COUNT:
- case GF_SHD_OP_STATISTICS_HEAL_COUNT_PER_REPLICA:
- case GF_SHD_OP_HEAL_ENABLE:
- case GF_SHD_OP_HEAL_DISABLE:
- case GF_SHD_OP_GRANULAR_ENTRY_HEAL_DISABLE:
+ default:
ret = -EINVAL;
break;
}