From: Zhaoming Luo Date: Mon, 9 Dec 2024 02:11:54 +0000 (+0800) Subject: hwclock: Remove ioperm declare as it causes nested extern declare warning X-Git-Tag: v2.42-start~125 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5763e74d3cea008c31bfd48bc88660a1a32ecfa6;p=thirdparty%2Futil-linux.git hwclock: Remove ioperm declare as it causes nested extern declare warning The extern declaration causes the following warning: ``` CC sys-utils/hwclock-hwclock-cmos.o sys-utils/hwclock-cmos.c: In function 'i386_iopl': sys-utils/hwclock-cmos.c:356:20: warning: nested extern declaration of 'ioperm' [-Wnested-externs] 356 | extern int ioperm(unsigned long from, unsigned long num, int turn_on); | ^~~~~~ sys-utils/hwclock-cmos.c:356:20: warning: redundant redeclaration of 'ioperm' [-Wredundant-decls] In file included from sys-utils/hwclock-cmos.c:68: /usr/include/i386-gnu/sys/io.h:29:12: note: previous declaration of 'ioperm' with type 'int(long unsigned int, long unsigned int, int)' 29 | extern int ioperm (unsigned long int __from, unsigned long int __num, | ^~~~~~ CCLD hwclock ``` --- diff --git a/sys-utils/hwclock-cmos.c b/sys-utils/hwclock-cmos.c index 7e5eecc7d..c7f82437d 100644 --- a/sys-utils/hwclock-cmos.c +++ b/sys-utils/hwclock-cmos.c @@ -352,7 +352,6 @@ static int i386_iopl(const int level) # else static int i386_iopl(const int level __attribute__ ((__unused__))) { - extern int ioperm(unsigned long from, unsigned long num, int turn_on); return ioperm(clock_ctl_addr, 2, 1); } # endif