Skip to contentSkip to conversation

SCTP: fix compile warning building without CONFIG_IPV6

PATCH In review Li Zefan 2 participants 4 messages Mar 24, 2008

Subsystems (2)
lore
Share & tools
lore

Li Zefan

author
#0 lore raw

PATCH 1/1 SCTP: fix compile warning building without CONFIG_IPV6

include/net/sctp/sctp.h: In function ‘sctp_v6_pf_init’:
include/net/sctp/sctp.h:392: warning: 'return' with a value, in function returning void

This warning repeats several times.

---
 include/net/sctp/sctp.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
include/net/sctp/sctp.h +1 -1
index 57ed3e3..ea80673 100644
@@ -389,7 +389,7 @@ void sctp_v6_del_protocol(void);
 
 #else /* #ifdef defined(CONFIG_IPV6) */
 
-static inline void sctp_v6_pf_init(void) { return 0; }
+static inline void sctp_v6_pf_init(void) { return; }
 static inline void sctp_v6_pf_exit(void) { return; }
 static inline int sctp_v6_protosw_init(void) { return 0; }
 static inline void sctp_v6_protosw_exit(void) { return; }
Signature · 1 line
1.5.4.rc3
maintainer
#1 lore raw

From: Li Zefan <[email protected]>
Date: Mon, 24 Mar 2008 14:11:20 +0800

Quoted 6 lines

include/net/sctp/sctp.h: In function ‘sctp_v6_pf_init’:
include/net/sctp/sctp.h:392: warning: 'return' with a value, in function returning void

This warning repeats several times.

Fixed in net-2.6 for several days already. ���{.n�+�������+%�����ݶ��w��{.n�+����{��G�����{ay�ʇڙ�,j��f���h��������z_�(�階�ݢj"���m������G������?����&���~��iO��z��v�^�m���� ������?�I�

author
#2 lore raw
Quoted 11 lines · David Miller

From: Li Zefan <[email protected]>
Date: Mon, 24 Mar 2008 14:11:20 +0800

Quoted 6 lines

include/net/sctp/sctp.h: In function ‘sctp_v6_pf_init’:
include/net/sctp/sctp.h:392: warning: 'return' with a value, in function returning void

This warning repeats several times.

Fixed in net-2.6 for several days already.

I looked into the git-log of net-2.6-26 and didn't find the fix. So I posted this patch..

maintainer
#3 lore raw

From: Li Zefan <[email protected]>
Date: Mon, 24 Mar 2008 15:01:06 +0800

Quoted 7 lines
Quoted 6 lines · David Miller

From: Li Zefan <[email protected]>
Date: Mon, 24 Mar 2008 14:11:20 +0800

Quoted 3 lines

include/net/sctp/sctp.h: In function ‘sctp_v6_pf_init’:
include/net/sctp/sctp.h:392: warning: 'return' with a value, in function returning void

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

This warning repeats several times.

Fixed in net-2.6 for several days already.

I looked into the git-log of net-2.6-26 and didn't find the fix.

The net-2.6 tree, not net-2.6.26, holds bug fixes and the change in question was checked in on Friday.

commit 1233823b0847190976d69a86d7bb1287992ba2c7

Author: David S. Miller <[email protected]>
Date:   Fri Mar 21 15:40:47 2008 -0700

[SCTP]: Fix build warnings with IPV6 disabled.

Introduced by 270637abff0cdf848b910b9f96ad342e1da61c66 ("[SCTP]: Fix a race between module load and protosw access")

Reported by Gabriel C:

In file included from net/sctp/sm_statetable.c:50:
include/net/sctp/sctp.h: In function 'sctp_v6_pf_init':
include/net/sctp/sctp.h:392: warning: 'return' with a value, in function returning void In file included from net/sctp/sm_statefuns.c:62:
include/net/sctp/sctp.h: In function 'sctp_v6_pf_init':
include/net/sctp/sctp.h:392: warning: 'return' with a value, in function returning void
...

include/net/sctp/sctp.h +1 -1
index 57ed3e3..ea80673 100644
@@ -389,7 +389,7 @@ void sctp_v6_del_protocol(void);
 
 #else /* #ifdef defined(CONFIG_IPV6) */
 
-static inline void sctp_v6_pf_init(void) { return 0; }
+static inline void sctp_v6_pf_init(void) { return; }
 static inline void sctp_v6_pf_exit(void) { return; }
 static inline int sctp_v6_protosw_init(void) { return 0; }
 static inline void sctp_v6_protosw_exit(void) { return; }

���{.n�+�������+%�����ݶ��w��{.n�+����{��G�����{ay�ʇڙ�,j��f���h��������z_�(�階�ݢj"���m������G������?����&���~��iO��z��v�^�m���� ������?�I�