diff mbox series

[2/2] restorecond: use strict function prototype for definition

Message ID 20220808173620.16760-2-cgzones@googlemail.com (mailing list archive)
State Accepted
Commit b5b3afbaed29
Headers show
Series [1/2] checkpolicy: use strict function prototype for definitions | expand

Commit Message

Christian Göttsche Aug. 8, 2022, 5:36 p.m. UTC
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(-)

Comments

Daniel Burgener Aug. 9, 2022, 1:59 p.m. UTC | #1
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>
diff mbox series

Patch

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;