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 |
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 --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;
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(-)