From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26982 invoked by alias); 13 Aug 2007 14:04:56 -0000 Received: (qmail 26947 invoked by uid 22791); 13 Aug 2007 14:04:54 -0000 X-Spam-Check-By: sourceware.org Received: from sunsite.ms.mff.cuni.cz (HELO sunsite.mff.cuni.cz) (195.113.15.26) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 13 Aug 2007 14:04:47 +0000 Received: from sunsite.mff.cuni.cz (localhost.localdomain [127.0.0.1]) by sunsite.mff.cuni.cz (8.13.8/8.13.8) with ESMTP id l7DEAVJH007535; Mon, 13 Aug 2007 16:10:31 +0200 Received: (from jakub@localhost) by sunsite.mff.cuni.cz (8.13.8/8.13.8/Submit) id l7DEAVd0007532; Mon, 13 Aug 2007 16:10:31 +0200 Date: Mon, 13 Aug 2007 14:04:00 -0000 From: Jakub Jelinek To: Ulrich Drepper Cc: Glibc hackers Subject: [PATCH] Some warning fixes from --enable-kernel=2.6.22 build Message-ID: <20070813141031.GN4603@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.2.2i Mailing-List: contact libc-hacker-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-hacker-owner@sourceware.org X-SW-Source: 2007-08/txt/msg00014.txt.bz2 Hi! Fixes static function defined resp. declared, but never used warnings in dl-vdso*, pselect*, ppoll* and clock_settime and redefinition of ROUND in dl-sysdep.c. 2007-08-13 Jakub Jelinek * sysdeps/unix/sysv/linux/dl-vdso.c: Don't include dl-hash.h. * sysdeps/unix/sysv/linux/dl-vdso.h: Don't include dl-hash.h if NDEBUG. (CHECK_HASH): New macro. (PREPARE_VERSION): Use it. * sysdeps/unix/sysv/linux/pselect.c (__generic_pselect): Only provide prototype if not __ASSUME_PSELECT. * sysdeps/unix/sysv/linux/ppoll.c (__generic_ppoll): Only provide prototype if not __ASSUME_PPOLL. * sysdeps/unix/sysv/linux/dl-osinfo.h (ROUND): #undef after use. * sysdeps/unix/clock_settime.c (freq, __pthread_clock_settime, hp_timing_settime): Don't define or declare if HANDLED_CPUTIME is defined. --- libc/sysdeps/unix/sysv/linux/dl-vdso.c.jj 2007-08-12 21:33:14.000000000 +0200 +++ libc/sysdeps/unix/sysv/linux/dl-vdso.c 2007-08-13 12:11:02.000000000 +0200 @@ -18,7 +18,6 @@ 02111-1307 USA. */ #include "config.h" -#include #include --- libc/sysdeps/unix/sysv/linux/dl-vdso.h.jj 2007-08-12 21:33:23.000000000 +0200 +++ libc/sysdeps/unix/sysv/linux/dl-vdso.h 2007-08-13 12:14:12.000000000 +0200 @@ -21,9 +21,14 @@ #define _DL_VDSO_H 1 #include -#include #include +#ifdef NDEBUG +# define CHECK_HASH(var) do {} while (0) +#else +# include +# define CHECK_HASH(var) assert (var.hash == _dl_elf_hash (var.name)) +#endif /* Create version number record for lookup. */ #define PREPARE_VERSION(var, vname, vhash) \ @@ -31,7 +36,7 @@ var.name = vname; \ var.hidden = 1; \ var.hash = vhash; \ - assert (var.hash == _dl_elf_hash (vname)); \ + CHECK_HASH (var); \ /* We don't have a specific file where the symbol can be found. */ \ var.filename = NULL --- libc/sysdeps/unix/sysv/linux/pselect.c.jj 2006-01-21 09:15:36.000000000 +0100 +++ libc/sysdeps/unix/sysv/linux/pselect.c 2007-08-13 15:06:00.000000000 +0200 @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 Free Software Foundation, Inc. +/* Copyright (C) 2006, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2006. @@ -26,10 +26,12 @@ #ifdef __NR_pselect6 +# ifndef __ASSUME_PSELECT static int __generic_pselect (int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, const struct timespec *timeout, const sigset_t *sigmask); +# endif int --- libc/sysdeps/unix/sysv/linux/dl-osinfo.h.jj 2007-08-10 15:31:54.000000000 +0200 +++ libc/sysdeps/unix/sysv/linux/dl-osinfo.h 2007-08-13 12:15:37.000000000 +0200 @@ -71,6 +71,7 @@ _dl_discover_osversion (void) #define ROUND(len) (((len) + sizeof note->n_type - 1) & -sizeof note->n_type) note = ((const void *) (note + 1) + ROUND (note->n_namesz) + ROUND (note->n_descsz)); +#undef ROUND } } } --- libc/sysdeps/unix/sysv/linux/ppoll.c.jj 2006-01-20 07:54:43.000000000 +0100 +++ libc/sysdeps/unix/sysv/linux/ppoll.c 2007-08-13 15:05:01.000000000 +0200 @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 Free Software Foundation, Inc. +/* Copyright (C) 2006, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2006. @@ -26,9 +26,11 @@ #ifdef __NR_ppoll +# ifndef __ASSUME_PPOLL static int __generic_ppoll (struct pollfd *fds, nfds_t nfds, const struct timespec *timeout, const sigset_t *sigmask); +# endif int --- libc/sysdeps/unix/clock_settime.c.jj 2006-08-13 10:06:21.000000000 +0200 +++ libc/sysdeps/unix/clock_settime.c 2007-08-13 15:28:28.000000000 +0200 @@ -1,4 +1,4 @@ -/* Copyright (C) 1999-2004, 2006 Free Software Foundation, Inc. +/* Copyright (C) 1999-2004, 2006, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -23,7 +23,7 @@ #include -#if HP_TIMING_AVAIL +#if HP_TIMING_AVAIL && !defined HANDLED_CPUTIME /* Clock frequency of the processor. We make it a 64-bit variable because some jokers are already playing with processors with more than 4GHz. */ @@ -33,10 +33,8 @@ static hp_timing_t freq; /* This function is defined in the thread library. */ extern void __pthread_clock_settime (clockid_t clock_id, hp_timing_t offset) __attribute__ ((__weak__)); -#endif -#if HP_TIMING_AVAIL static int hp_timing_settime (clockid_t clock_id, const struct timespec *tp) { Jakub