diff mbox series

[v2,4/6] libsepol/cil: comment out unused function __cil_verify_rule

Message ID 20220405133548.51598-4-cgzones@googlemail.com (mailing list archive)
State Accepted
Commit 8c1159363aa5
Headers show
Series [v2,1/6] libsepol/cil: declare file local functions static | expand

Commit Message

Christian Göttsche April 5, 2022, 1:35 p.m. UTC
The function __cil_verify_rule() is currently not used as all call sites
are commented out.  Keep the function for future references.

Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
---
 libsepol/cil/src/cil_verify.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

James Carter April 6, 2022, 4:15 p.m. UTC | #1
On Wed, Apr 6, 2022 at 9:28 AM Christian Göttsche
<cgzones@googlemail.com> wrote:
>
> The function __cil_verify_rule() is currently not used as all call sites
> are commented out.  Keep the function for future references.
>
> Signed-off-by: Christian Göttsche <cgzones@googlemail.com>

Patches 1-3 have already been merged.

For patches 4-6:
Acked-by: James Carter <jwcart2@gmail.com>

> ---
>  libsepol/cil/src/cil_verify.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/libsepol/cil/src/cil_verify.c b/libsepol/cil/src/cil_verify.c
> index aecbdc19..4640dc59 100644
> --- a/libsepol/cil/src/cil_verify.c
> +++ b/libsepol/cil/src/cil_verify.c
> @@ -970,7 +970,8 @@ exit:
>         return rc;
>  }
>
> -int __cil_verify_rule(struct cil_tree_node *node, struct cil_complex_symtab *symtab)
> +/*
> +static int __cil_verify_rule(struct cil_tree_node *node, struct cil_complex_symtab *symtab)
>  {
>
>         int rc = SEPOL_ERR;
> @@ -1016,6 +1017,7 @@ exit:
>         cil_tree_log(node, CIL_ERR, "Invalid rule");
>         return rc;
>  }
> +*/
>
>  static int __cil_verify_booleanif_helper(struct cil_tree_node *node, __attribute__((unused)) uint32_t *finished, __attribute__((unused)) void *extra_args)
>  {
> --
> 2.35.1
>
James Carter April 20, 2022, 7:04 p.m. UTC | #2
On Wed, Apr 6, 2022 at 12:15 PM James Carter <jwcart2@gmail.com> wrote:
>
> On Wed, Apr 6, 2022 at 9:28 AM Christian Göttsche
> <cgzones@googlemail.com> wrote:
> >
> > The function __cil_verify_rule() is currently not used as all call sites
> > are commented out.  Keep the function for future references.
> >
> > Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
>
> Patches 1-3 have already been merged.
>
> For patches 4-6:
> Acked-by: James Carter <jwcart2@gmail.com>
>

Now that the libsepol and libsemanage tests work for
"-Wmissing-prototypes", patches 4-6 have been merged.
Thanks,
Jim

> > ---
> >  libsepol/cil/src/cil_verify.c | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> >
> > diff --git a/libsepol/cil/src/cil_verify.c b/libsepol/cil/src/cil_verify.c
> > index aecbdc19..4640dc59 100644
> > --- a/libsepol/cil/src/cil_verify.c
> > +++ b/libsepol/cil/src/cil_verify.c
> > @@ -970,7 +970,8 @@ exit:
> >         return rc;
> >  }
> >
> > -int __cil_verify_rule(struct cil_tree_node *node, struct cil_complex_symtab *symtab)
> > +/*
> > +static int __cil_verify_rule(struct cil_tree_node *node, struct cil_complex_symtab *symtab)
> >  {
> >
> >         int rc = SEPOL_ERR;
> > @@ -1016,6 +1017,7 @@ exit:
> >         cil_tree_log(node, CIL_ERR, "Invalid rule");
> >         return rc;
> >  }
> > +*/
> >
> >  static int __cil_verify_booleanif_helper(struct cil_tree_node *node, __attribute__((unused)) uint32_t *finished, __attribute__((unused)) void *extra_args)
> >  {
> > --
> > 2.35.1
> >
diff mbox series

Patch

diff --git a/libsepol/cil/src/cil_verify.c b/libsepol/cil/src/cil_verify.c
index aecbdc19..4640dc59 100644
--- a/libsepol/cil/src/cil_verify.c
+++ b/libsepol/cil/src/cil_verify.c
@@ -970,7 +970,8 @@  exit:
 	return rc;
 }
 
-int __cil_verify_rule(struct cil_tree_node *node, struct cil_complex_symtab *symtab)
+/*
+static int __cil_verify_rule(struct cil_tree_node *node, struct cil_complex_symtab *symtab)
 {
 
 	int rc = SEPOL_ERR;
@@ -1016,6 +1017,7 @@  exit:
 	cil_tree_log(node, CIL_ERR, "Invalid rule");
 	return rc;
 }
+*/
 
 static int __cil_verify_booleanif_helper(struct cil_tree_node *node, __attribute__((unused)) uint32_t *finished, __attribute__((unused)) void *extra_args)
 {