Subject: lib/34801: minor C adjustment patch in libc
To: None <lib-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: None <dholland@eecs.harvard.edu>
List: netbsd-bugs
Date: 10/13/2006 06:20:00
>Number: 34801
>Category: lib
>Synopsis: minor C adjustment patch in libc
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: lib-bug-people
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Fri Oct 13 06:20:00 +0000 2006
>Originator: David A. Holland
>Release: NetBSD 4.99.3 (20061010)
>Organization:
>Environment:
System: NetBSD tanaqui 4.99.3 NetBSD 4.99.3 (TANAQUI) #6: Tue Oct 10 19:32:37 EDT 2006 dholland@tanaqui:/usr/src/sys/arch/i386/compile/TANAQUI i386
Architecture: i386
Machine: i386
>Description:
It's generally preferred that storage classes come first in a declaration,
and nowadays gcc will say so if suitably encouraged.
Caught by compiling with warnings cranked up (see toolchain/30097).
>How-To-Repeat:
n/a
>Fix:
Index: lib/libc/net/ethers.c
===================================================================
RCS file: /cvsroot/src/lib/libc/net/ethers.c,v
retrieving revision 1.20
diff -u -r1.20 ethers.c
--- lib/libc/net/ethers.c 16 Sep 2002 19:25:33 -0000 1.20
+++ lib/libc/net/ethers.c 12 Oct 2006 06:35:05 -0000
@@ -206,7 +206,7 @@
#define S2(arg) #arg
#define S1(arg) S2(arg)
- const static char fmt[] = " %x:%x:%x:%x:%x:%x"
+ static const char fmt[] = " %x:%x:%x:%x:%x:%x"
" %" S1(MAXHOSTNAMELEN) "s\n";
#undef S2
#undef S1