mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [Patch] 2.4.2: af_unix.c warnings
@ 2001-02-22 13:53 Russell King
  2001-02-23  1:34 ` David S. Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Russell King @ 2001-02-22 13:53 UTC (permalink / raw)
  To: linux-kernel

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:

--- orig/net/unix/af_unix.c	Thu Feb 22 11:25:50 2001
+++ linux/net/unix/af_unix.c	Thu Feb 22 13:54:41 2001
@@ -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 (rmk@arm.linux.org.uk)                The developer of ARM Linux
             http://www.arm.linux.org.uk/personal/aboutme.html


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-02-23  1:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-02-22 13:53 [Patch] 2.4.2: af_unix.c warnings Russell King
2001-02-23  1:34 ` David S. Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®