diff mbox series

[RFC,4/4] Enable missing prototypes

Message ID 20220331144752.31495-4-cgzones@googlemail.com (mailing list archive)
State Changes Requested
Headers show
Series [RFC,1/4] libsepol/cil: declare file local functions static | expand

Commit Message

Christian Göttsche March 31, 2022, 2:47 p.m. UTC
Check for missing prototypes like file local functions not declared
static or external functions not being declared to avoid declaration/
definition desynchronizations.

Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
---
 Makefile | 1 +
 1 file changed, 1 insertion(+)

Comments

James Carter April 1, 2022, 8:58 p.m. UTC | #1
On Thu, Mar 31, 2022 at 2:36 PM Christian Göttsche
<cgzones@googlemail.com> wrote:
>
> Check for missing prototypes like file local functions not declared
> static or external functions not being declared to avoid declaration/
> definition desynchronizations.
>
> Signed-off-by: Christian Göttsche <cgzones@googlemail.com>

We're not ready for this one yet.

    ../cil/src/cil_verify.c:973:5: warning: no previous prototype for
‘__cil_verify_rule’ [-Wmissing-prototypes]

This one is easy to handle. The function is not used, or, rather, not
fully implemented and not used. So it can be removed.

    semanageswig_wrap.c:2759:24: warning: no previous prototype for
‘PyInit__semanage’ [-Wmissing-prototypes]

This one I am not sure about.

Jim


> ---
>  Makefile | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/Makefile b/Makefile
> index 215e313e..2ffba8e9 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -14,6 +14,7 @@ else
>                 -Winit-self \
>                 -Wmissing-format-attribute \
>                 -Wmissing-noreturn \
> +               -Wmissing-prototypes \
>                 -Wnull-dereference \
>                 -Wpointer-arith \
>                 -Wshadow \
> --
> 2.35.1
>
diff mbox series

Patch

diff --git a/Makefile b/Makefile
index 215e313e..2ffba8e9 100644
--- a/Makefile
+++ b/Makefile
@@ -14,6 +14,7 @@  else
 		-Winit-self \
 		-Wmissing-format-attribute \
 		-Wmissing-noreturn \
+		-Wmissing-prototypes \
 		-Wnull-dereference \
 		-Wpointer-arith \
 		-Wshadow \