checkpolicy: use strict function prototype for definitions
PATCH 1/2 checkpolicy: use strict function prototype for definitions
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
--- checkpolicy/policy_define.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
checkpolicy/policy_define.c +2 -2
@@ -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 ;
Signature · 1 line
2.36.1
PATCH 2/2 restorecond: use strict function prototype for definition
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--- restorecond/user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
restorecond/user.c +1 -1
@@ -169,7 +169,7 @@ io_channel_callbackreturn TRUE; } -int start () { +int start (void ) {#ifdef HAVE_DBUS GDBusConnection *bus;GError *err =NULL ;
Signature · 1 line
2.36.1
Re: [PATCH 2/2] restorecond: use strict function prototype for definition
Quoted 17 lines · Christian Göttsche
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() { ^ voidSigned-off-by Christian Göttsche <[email protected]>--- restorecond/user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)restorecond/user.c +0
-0
restorecond/user.c io_channel_callback · line 175
Quoted 8 lines
restorecond/user.c +1
-1@@ -169,7 +169,7 @@ io_channel_callbackreturn TRUE; } -int start () { +int start (void ) {#ifdef HAVE_DBUS GDBusConnection *bus;GError *err =NULL ;
Quoted 30 lines · Christian Göttsche
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] intdefine_ipv4_node_context()
^
voidSigned-off-by Christian Göttsche <[email protected]>--- checkpolicy/policy_define.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)checkpolicy/policy_define.c +1
-1@@ -4904,7 +4904,7 @@ bad:return -1 ; } -int define_devicetree_context () +int define_devicetree_context (void ) {ocontext_t *newc, *c, *l, *head;
checkpolicy/policy_define.c int define_netif_context(void) · line 5301
Quoted 8 lines
checkpolicy/policy_define.c +1
-1@@ -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 ;
James Carter
Acked-byQuoted 13 lines · Daniel Burgener
Quoted 11 lines · Christian Göttsche
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] intdefine_ipv4_node_context()
^
void
Quoted 1 line
Quoted 1 line
Signed-off-by Christian Göttsche <[email protected]>
For this series:
Quoted 28 lines
Quoted 18 lines
--- checkpolicy/policy_define.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)checkpolicy/policy_define.c +1
-1@@ -4904,7 +4904,7 @@ bad:return -1 ; } -int define_devicetree_context () +int define_devicetree_context (void ) {ocontext_t *newc, *c, *l, *head;checkpolicy/policy_define.c int define_netif_context(void) · line 5301
Quoted 8 lines
checkpolicy/policy_define.c +1
-1@@ -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 <[email protected]>
Quoted 16 lines · James Carter
Quoted 13 lines · Daniel Burgener
Quoted 11 lines · Christian Göttsche
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] intdefine_ipv4_node_context()
^
void
Quoted 5 lines
Quoted 1 line
Quoted 1 line
Signed-off-by Christian Göttsche <[email protected]>For this series:
Acked-by James Carter <[email protected]>
This series has been merged.
Thanks,
Jim
Quoted 28 lines
Quoted 28 lines
Quoted 18 lines
--- checkpolicy/policy_define.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)checkpolicy/policy_define.c +1
-1@@ -4904,7 +4904,7 @@ bad:return -1 ; } -int define_devicetree_context () +int define_devicetree_context (void ) {ocontext_t *newc, *c, *l, *head;checkpolicy/policy_define.c int define_netif_context(void) · line 5301
Quoted 8 lines
checkpolicy/policy_define.c +1
-1@@ -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 <[email protected]>