diff mbox series

libsepol: Drop unused assignment

Message ID 20220607115557.492447-1-plautrba@redhat.com (mailing list archive)
State Accepted
Commit 3f23f07f01d3
Headers show
Series libsepol: Drop unused assignment | expand

Commit Message

Petr Lautrbach June 7, 2022, 11:55 a.m. UTC
Fixes:
cil/src/cil_build_ast.c:4622:4: warning[deadcode.DeadStores]: Value stored to 'rc' is never read

Signed-off-by: Petr Lautrbach <plautrba@redhat.com>
---
 libsepol/cil/src/cil_build_ast.c | 1 -
 1 file changed, 1 deletion(-)

Comments

James Carter June 8, 2022, 6:28 p.m. UTC | #1
On Tue, Jun 7, 2022 at 8:55 AM Petr Lautrbach <plautrba@redhat.com> wrote:
>
> Fixes:
> cil/src/cil_build_ast.c:4622:4: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
>
> Signed-off-by: Petr Lautrbach <plautrba@redhat.com>

Acked-by: James Carter <jwcart2@gmail.com>

> ---
>  libsepol/cil/src/cil_build_ast.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/libsepol/cil/src/cil_build_ast.c b/libsepol/cil/src/cil_build_ast.c
> index 26fa79069b96..4177c9f6778c 100644
> --- a/libsepol/cil/src/cil_build_ast.c
> +++ b/libsepol/cil/src/cil_build_ast.c
> @@ -4619,7 +4619,6 @@ int cil_gen_genfscon(struct cil_db *db, struct cil_tree_node *parse_current, str
>                         } else {
>                                 cil_log(CIL_ERR, "Invalid file type \"%s\"\n", file_type);
>                         }
> -                       rc = SEPOL_ERR;
>                         goto exit;
>                 }
>                 context_node = parse_current->next->next->next->next;
> --
> 2.36.1
>
James Carter June 15, 2022, 1:46 p.m. UTC | #2
On Wed, Jun 8, 2022 at 2:28 PM James Carter <jwcart2@gmail.com> wrote:
>
> On Tue, Jun 7, 2022 at 8:55 AM Petr Lautrbach <plautrba@redhat.com> wrote:
> >
> > Fixes:
> > cil/src/cil_build_ast.c:4622:4: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
> >
> > Signed-off-by: Petr Lautrbach <plautrba@redhat.com>
>
> Acked-by: James Carter <jwcart2@gmail.com>
>
Merged.
Thanks,
Jim

> > ---
> >  libsepol/cil/src/cil_build_ast.c | 1 -
> >  1 file changed, 1 deletion(-)
> >
> > diff --git a/libsepol/cil/src/cil_build_ast.c b/libsepol/cil/src/cil_build_ast.c
> > index 26fa79069b96..4177c9f6778c 100644
> > --- a/libsepol/cil/src/cil_build_ast.c
> > +++ b/libsepol/cil/src/cil_build_ast.c
> > @@ -4619,7 +4619,6 @@ int cil_gen_genfscon(struct cil_db *db, struct cil_tree_node *parse_current, str
> >                         } else {
> >                                 cil_log(CIL_ERR, "Invalid file type \"%s\"\n", file_type);
> >                         }
> > -                       rc = SEPOL_ERR;
> >                         goto exit;
> >                 }
> >                 context_node = parse_current->next->next->next->next;
> > --
> > 2.36.1
> >
diff mbox series

Patch

diff --git a/libsepol/cil/src/cil_build_ast.c b/libsepol/cil/src/cil_build_ast.c
index 26fa79069b96..4177c9f6778c 100644
--- a/libsepol/cil/src/cil_build_ast.c
+++ b/libsepol/cil/src/cil_build_ast.c
@@ -4619,7 +4619,6 @@  int cil_gen_genfscon(struct cil_db *db, struct cil_tree_node *parse_current, str
 			} else {
 				cil_log(CIL_ERR, "Invalid file type \"%s\"\n", file_type);
 			}
-			rc = SEPOL_ERR;
 			goto exit;
 		}
 		context_node = parse_current->next->next->next->next;