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>
This commit is contained in:
Pranith Kumar K 2017-11-27 15:07:05 +05:30 committed by Xavier Hernandez
parent eb013e4c18
commit 7ae126dcd9

View File

@ -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;
}