GCC4 audit.c warning: no return statement in
Subsystems (2)
PATCH RESEND 1/1 GCC4 audit.c warning: no return statement in
The function kauditd_thread() did not return an integer as the declaration says it should. Now, the function returns an integer 'err' initialized to 0, which was previously used for error checking but was not returned.
Signed-off-by Jesse Millan <[email protected]>
---
kernel/audit.c renamed from kernel/audit.c~audit-patch +3 -1
@@ -278,12 +278,13 @@ static int audit_set_failure(int state,int kauditd_thread (void *dummy) {struct sk_buff *skb; +int err =0 ;while (1 ) { skb =skb_dequeue (&audit_skb_queue);if (skb) {if (audit_pid) { -int err =netlink_unicast (audit_sock, skb, audit_pid,0 ); + err =netlink_unicast (audit_sock, skb, audit_pid,0 );if (err <0 ) {BUG_ON (err != -ECONNREFUSED );/* Shoudn't happen */ printk (KERN_ERR "audit: *NO* daemon at audit_pid=%d\n" , audit_pid);
@@ -305,6 +306,7 @@ int kauditd_thread(void *dummy)remove_wait_queue (&kauditd_wait, &wait); } } +return err; } void audit_send_reply(int pid, int seq, int type, int done, int multi,
_
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors