selinux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Burgener <dburgener@linux.microsoft.com>
To: "Christian Göttsche" <cgzones@googlemail.com>, selinux@vger.kernel.org
Subject: Re: [PATCH 1/2] checkpolicy: use strict function prototype for definitions
Date: Tue, 9 Aug 2022 09:56:47 -0400	[thread overview]
Message-ID: <d395fef5-379b-faa1-d974-2e58ee8381cd@linux.microsoft.com> (raw)
In-Reply-To: <20220808173620.16760-1-cgzones@googlemail.com>

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>

  parent reply	other threads:[~2022-08-09 13:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` Daniel Burgener [this message]
2022-08-10 15:34   ` [PATCH 1/2] checkpolicy: use strict function prototype for definitions James Carter
2022-08-15 15:54     ` James Carter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d395fef5-379b-faa1-d974-2e58ee8381cd@linux.microsoft.com \
    --to=dburgener@linux.microsoft.com \
    --cc=cgzones@googlemail.com \
    --cc=selinux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).