selinux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] checkpolicy: use strict function prototype for definitions
@ 2022-08-08 17:36 Christian Göttsche
  2022-08-08 17:36 ` [PATCH 2/2] restorecond: use strict function prototype for definition Christian Göttsche
  2022-08-09 13:56 ` [PATCH 1/2] checkpolicy: use strict function prototype for definitions Daniel Burgener
  0 siblings, 2 replies; 6+ messages in thread
From: Christian Göttsche @ 2022-08-08 17:36 UTC (permalink / raw)
  To: selinux

Clang 15 starts to complain about non strict function definitions:

    policy_define.c:4907:30: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
    int define_devicetree_context()
                                 ^
                                  void
    policy_define.c:5298:29: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
    int define_ipv4_node_context()
                                ^
                                 void

Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
---
 checkpolicy/policy_define.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/checkpolicy/policy_define.c b/checkpolicy/policy_define.c
index 8bf36859..f3b48870 100644
--- a/checkpolicy/policy_define.c
+++ b/checkpolicy/policy_define.c
@@ -4904,7 +4904,7 @@ bad:
 	return -1;
 }
 
-int define_devicetree_context()
+int define_devicetree_context(void)
 {
 	ocontext_t *newc, *c, *l, *head;
 
@@ -5295,7 +5295,7 @@ int define_netif_context(void)
 	return 0;
 }
 
-int define_ipv4_node_context()
+int define_ipv4_node_context(void)
 {	
 	char *id;
 	int rc = 0;
-- 
2.36.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/2] restorecond: use strict function prototype for definition
  2022-08-08 17:36 [PATCH 1/2] checkpolicy: use strict function prototype for definitions Christian Göttsche
@ 2022-08-08 17:36 ` Christian Göttsche
  2022-08-09 13:59   ` Daniel Burgener
  2022-08-09 13:56 ` [PATCH 1/2] checkpolicy: use strict function prototype for definitions Daniel Burgener
  1 sibling, 1 reply; 6+ messages in thread
From: Christian Göttsche @ 2022-08-08 17:36 UTC (permalink / raw)
  To: selinux

Clang 15 starts to complain about non strict function definitions:

    user.c:172:10: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
    int start() {
             ^
              void

Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
---
 restorecond/user.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/restorecond/user.c b/restorecond/user.c
index 47b86823..3ae3ebbb 100644
--- a/restorecond/user.c
+++ b/restorecond/user.c
@@ -169,7 +169,7 @@ io_channel_callback
   return TRUE;
 }
 
-int start() {
+int start(void) {
 #ifdef HAVE_DBUS
 	GDBusConnection *bus;
 	GError *err = NULL;
-- 
2.36.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] checkpolicy: use strict function prototype for definitions
  2022-08-08 17:36 [PATCH 1/2] checkpolicy: use strict function prototype for definitions Christian Göttsche
  2022-08-08 17:36 ` [PATCH 2/2] restorecond: use strict function prototype for definition Christian Göttsche
@ 2022-08-09 13:56 ` Daniel Burgener
  2022-08-10 15:34   ` James Carter
  1 sibling, 1 reply; 6+ messages in thread
From: Daniel Burgener @ 2022-08-09 13:56 UTC (permalink / raw)
  To: Christian Göttsche, selinux

On 8/8/2022 1:36 PM, Christian Göttsche wrote:
> Clang 15 starts to complain about non strict function definitions:
> 
>      policy_define.c:4907:30: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
>      int define_devicetree_context()
>                                   ^
>                                    void
>      policy_define.c:5298:29: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
>      int define_ipv4_node_context()
>                                  ^
>                                   void
> 
> Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
> ---
>   checkpolicy/policy_define.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/checkpolicy/policy_define.c b/checkpolicy/policy_define.c
> index 8bf36859..f3b48870 100644
> --- a/checkpolicy/policy_define.c
> +++ b/checkpolicy/policy_define.c
> @@ -4904,7 +4904,7 @@ bad:
>   	return -1;
>   }
>   
> -int define_devicetree_context()
> +int define_devicetree_context(void)
>   {
>   	ocontext_t *newc, *c, *l, *head;
>   
> @@ -5295,7 +5295,7 @@ int define_netif_context(void)
>   	return 0;
>   }
>   
> -int define_ipv4_node_context()
> +int define_ipv4_node_context(void)
>   {	
>   	char *id;
>   	int rc = 0;

Reviewed-by: Daniel Burgener <dburgener@linux.microsoft.com>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/2] restorecond: use strict function prototype for definition
  2022-08-08 17:36 ` [PATCH 2/2] restorecond: use strict function prototype for definition Christian Göttsche
@ 2022-08-09 13:59   ` Daniel Burgener
  0 siblings, 0 replies; 6+ messages in thread
From: Daniel Burgener @ 2022-08-09 13:59 UTC (permalink / raw)
  To: Christian Göttsche, selinux

On 8/8/2022 1:36 PM, Christian Göttsche wrote:
> Clang 15 starts to complain about non strict function definitions:
> 
>      user.c:172:10: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
>      int start() {
>               ^
>                void
> 
> Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
> ---
>   restorecond/user.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/restorecond/user.c b/restorecond/user.c
> index 47b86823..3ae3ebbb 100644
> --- a/restorecond/user.c
> +++ b/restorecond/user.c
> @@ -169,7 +169,7 @@ io_channel_callback
>     return TRUE;
>   }
>   
> -int start() {
> +int start(void) {
>   #ifdef HAVE_DBUS
>   	GDBusConnection *bus;
>   	GError *err = NULL;

Reviewed-by: Daniel Burgener <dburgener@linux.microsoft.com>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] checkpolicy: use strict function prototype for definitions
  2022-08-09 13:56 ` [PATCH 1/2] checkpolicy: use strict function prototype for definitions Daniel Burgener
@ 2022-08-10 15:34   ` James Carter
  2022-08-15 15:54     ` James Carter
  0 siblings, 1 reply; 6+ messages in thread
From: James Carter @ 2022-08-10 15:34 UTC (permalink / raw)
  To: Daniel Burgener; +Cc: Christian Göttsche, selinux

On Tue, Aug 9, 2022 at 10:06 AM Daniel Burgener
<dburgener@linux.microsoft.com> wrote:
>
> On 8/8/2022 1:36 PM, Christian Göttsche wrote:
> > Clang 15 starts to complain about non strict function definitions:
> >
> >      policy_define.c:4907:30: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
> >      int define_devicetree_context()
> >                                   ^
> >                                    void
> >      policy_define.c:5298:29: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
> >      int define_ipv4_node_context()
> >                                  ^
> >                                   void
> >
> > Signed-off-by: Christian Göttsche <cgzones@googlemail.com>

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

> > ---
> >   checkpolicy/policy_define.c | 4 ++--
> >   1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/checkpolicy/policy_define.c b/checkpolicy/policy_define.c
> > index 8bf36859..f3b48870 100644
> > --- a/checkpolicy/policy_define.c
> > +++ b/checkpolicy/policy_define.c
> > @@ -4904,7 +4904,7 @@ bad:
> >       return -1;
> >   }
> >
> > -int define_devicetree_context()
> > +int define_devicetree_context(void)
> >   {
> >       ocontext_t *newc, *c, *l, *head;
> >
> > @@ -5295,7 +5295,7 @@ int define_netif_context(void)
> >       return 0;
> >   }
> >
> > -int define_ipv4_node_context()
> > +int define_ipv4_node_context(void)
> >   {
> >       char *id;
> >       int rc = 0;
>
> Reviewed-by: Daniel Burgener <dburgener@linux.microsoft.com>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] checkpolicy: use strict function prototype for definitions
  2022-08-10 15:34   ` James Carter
@ 2022-08-15 15:54     ` James Carter
  0 siblings, 0 replies; 6+ messages in thread
From: James Carter @ 2022-08-15 15:54 UTC (permalink / raw)
  To: Daniel Burgener; +Cc: Christian Göttsche, selinux

On Wed, Aug 10, 2022 at 11:34 AM James Carter <jwcart2@gmail.com> wrote:
>
> On Tue, Aug 9, 2022 at 10:06 AM Daniel Burgener
> <dburgener@linux.microsoft.com> wrote:
> >
> > On 8/8/2022 1:36 PM, Christian Göttsche wrote:
> > > Clang 15 starts to complain about non strict function definitions:
> > >
> > >      policy_define.c:4907:30: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
> > >      int define_devicetree_context()
> > >                                   ^
> > >                                    void
> > >      policy_define.c:5298:29: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
> > >      int define_ipv4_node_context()
> > >                                  ^
> > >                                   void
> > >
> > > Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
>
> For this series:
> Acked-by: James Carter <jwcart2@gmail.com>
>
This series has been merged.
Thanks,
Jim

> > > ---
> > >   checkpolicy/policy_define.c | 4 ++--
> > >   1 file changed, 2 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/checkpolicy/policy_define.c b/checkpolicy/policy_define.c
> > > index 8bf36859..f3b48870 100644
> > > --- a/checkpolicy/policy_define.c
> > > +++ b/checkpolicy/policy_define.c
> > > @@ -4904,7 +4904,7 @@ bad:
> > >       return -1;
> > >   }
> > >
> > > -int define_devicetree_context()
> > > +int define_devicetree_context(void)
> > >   {
> > >       ocontext_t *newc, *c, *l, *head;
> > >
> > > @@ -5295,7 +5295,7 @@ int define_netif_context(void)
> > >       return 0;
> > >   }
> > >
> > > -int define_ipv4_node_context()
> > > +int define_ipv4_node_context(void)
> > >   {
> > >       char *id;
> > >       int rc = 0;
> >
> > Reviewed-by: Daniel Burgener <dburgener@linux.microsoft.com>

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-08-15 15:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-08 17:36 [PATCH 1/2] checkpolicy: use strict function prototype for definitions Christian Göttsche
2022-08-08 17:36 ` [PATCH 2/2] restorecond: use strict function prototype for definition Christian Göttsche
2022-08-09 13:59   ` Daniel Burgener
2022-08-09 13:56 ` [PATCH 1/2] checkpolicy: use strict function prototype for definitions Daniel Burgener
2022-08-10 15:34   ` James Carter
2022-08-15 15:54     ` James Carter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).