Skip to contentSkip to conversation

2.4.2: af_unix.c warnings

PATCH Applied Russell King 2 participants 2 messages Feb 22, 2001 – Feb 23, 2001

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 2.4.2: af_unix.c warnings

Hi,

In 2.4.2 with CONFIG_SYSCTL=n, I'm seeing the following warnings while compiling af_unix.c:

gcc -D__KERNEL__ -I/usr/src/v2.4/linux-p720t/include -Wall -Wstrict-prototypes -O2 -fno-strict-aliasing -fno-common -pipe -mapcs-32 -march=armv4 -mtune=arm7tdmi -mshort-load-bytes -msoft-float -c -o af_unix.o af_unix.c
af_unix.c:1855: warning: return-type defaults to int' af_unix.c:1855: warning: function declaration isn't a prototype af_unix.c: In function unix_sysctl_register':
af_unix.c:1855: warning: control reaches end of non-void function af_unix.c: At top level:
af_unix.c:1856: warning: return-type defaults to int' af_unix.c:1856: warning: function declaration isn't a prototype af_unix.c: In function unix_sysctl_unregister':
af_unix.c:1856: warning: control reaches end of non-void function

The following patch fixes these warnings:

net/unix/af_unix.c +2 -2
@@ -1852,8 +1852,8 @@
 extern void unix_sysctl_register(void);
 extern void unix_sysctl_unregister(void);
 #else
-static inline unix_sysctl_register() {};
-static inline unix_sysctl_unregister() {};
+static inline void unix_sysctl_register(void) {}
+static inline void unix_sysctl_unregister(void) {}
 #endif
 
 static const char banner[] __initdata = KERN_INFO "NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.\n";

--
Russell King ([email protected]) The developer of ARM Linux
http://www.arm.linux.org.uk/personal/aboutme.html