From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13861 invoked by alias); 7 Dec 2004 20:48:16 -0000 Mailing-List: contact libc-hacker-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-hacker-owner@sources.redhat.com Received: (qmail 13708 invoked from network); 7 Dec 2004 20:48:15 -0000 Received: from unknown (HELO sunsite.mff.cuni.cz) (195.113.15.26) by sourceware.org with SMTP; 7 Dec 2004 20:48:15 -0000 Received: from sunsite.mff.cuni.cz (sunsite.mff.cuni.cz [127.0.0.1]) by sunsite.mff.cuni.cz (8.13.1/8.13.1) with ESMTP id iB7Km8Oh003908; Tue, 7 Dec 2004 21:48:08 +0100 Received: (from jj@localhost) by sunsite.mff.cuni.cz (8.13.1/8.13.1/Submit) id iB7Km8Sh003906; Tue, 7 Dec 2004 21:48:08 +0100 Date: Tue, 07 Dec 2004 20:48:00 -0000 From: Jakub Jelinek To: Ulrich Drepper Cc: Glibc hackers Subject: [PATCH] Shut up a warning in sysconf.c Message-ID: <20041207204807.GE5149@sunsite.mff.cuni.cz> Reply-To: Jakub Jelinek Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i X-SW-Source: 2004-12/txt/msg00029.txt.bz2 Hi! On ia64 I get: ../sysdeps/posix/sysconf.c:1215: warning: '__sysconf_check_spec' defined but not used The following patch seems to cure it. I tried __attribute__((unused)) first but for some reason that still warned (maybe compiler bug). __attribute_used__ is not something that is desirable in this case, as there is no point in actually having the routine if it will be never used. 2004-12-07 Jakub Jelinek * sysdeps/posix/sysconf.c (__sysconf_check_spec): Only define if it will be actually used. --- libc/sysdeps/posix/sysconf.c.jj 2004-12-07 15:42:04.000000000 -0500 +++ libc/sysdeps/posix/sysconf.c 2004-12-07 15:50:38.000000000 -0500 @@ -34,7 +34,12 @@ #include +#if !defined _XBS5_ILP32_OFF32 || !defined _XBS5_ILP32_OFFBIG \ + || !defined _XBS5_LP64_OFF64 || !defined _XBS5_LPBIG_OFFBIG \ + || !defined _POSIX_V6_ILP32_OFF32 || !defined _POSIX_V6_ILP32_OFFBIG \ + || !defined _POSIX_V6_LP64_OFF64 || !defined _POSIX_V6_LPBIG_OFFBIG static long int __sysconf_check_spec (const char *spec); +#endif /* Get the value of the system variable NAME. */ @@ -1210,6 +1215,10 @@ __sysconf (name) weak_alias (__sysconf, sysconf) libc_hidden_def (__sysconf) +#if !defined _XBS5_ILP32_OFF32 || !defined _XBS5_ILP32_OFFBIG \ + || !defined _XBS5_LP64_OFF64 || !defined _XBS5_LPBIG_OFFBIG \ + || !defined _POSIX_V6_ILP32_OFF32 || !defined _POSIX_V6_ILP32_OFFBIG \ + || !defined _POSIX_V6_LP64_OFF64 || !defined _POSIX_V6_LPBIG_OFFBIG static long int __sysconf_check_spec (const char *spec) { @@ -1230,3 +1239,4 @@ __sysconf_check_spec (const char *spec) __set_errno (save_errno); return ret; } +#endif Jakub