Re: [PATCH 17/23] libsepol/cil: drop dead store

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jun 8, 2021 at 12:01 PM Christian Göttsche
<cgzones@xxxxxxxxxxxxxx> wrote:
>
> ../cil/src/cil_binary.c:2230:24: warning: Value stored to 'cb_node' during its initialization is never read [deadcode.DeadStores]
>         struct cil_tree_node *cb_node = node->cl_head;
>                               ^~~~~~~   ~~~~~~~~~~~~~
>
> Found by clang-analyzer
>
> Signed-off-by: Christian Göttsche <cgzones@xxxxxxxxxxxxxx>

Acked-by: James Carter <jwcart2@xxxxxxxxx>

> ---
>  libsepol/cil/src/cil_binary.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libsepol/cil/src/cil_binary.c b/libsepol/cil/src/cil_binary.c
> index 85094b01..601fe8d1 100644
> --- a/libsepol/cil/src/cil_binary.c
> +++ b/libsepol/cil/src/cil_binary.c
> @@ -2227,7 +2227,7 @@ int cil_booleanif_to_policydb(policydb_t *pdb, const struct cil_db *db, struct c
>         int rc = SEPOL_ERR;
>         struct cil_args_booleanif bool_args;
>         struct cil_booleanif *cil_boolif = (struct cil_booleanif*)node->data;
> -       struct cil_tree_node *cb_node = node->cl_head;
> +       struct cil_tree_node *cb_node;
>         struct cil_tree_node *true_node = NULL;
>         struct cil_tree_node *false_node = NULL;
>         struct cil_tree_node *tmp_node = NULL;
> --
> 2.32.0
>




[Index of Archives]     [Selinux Refpolicy]     [Linux SGX]     [Fedora Users]     [Fedora Desktop]     [Yosemite Photos]     [Yosemite Camping]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux