From: Jakub Jelinek <jakub@redhat.com>
To: Ulrich Drepper <drepper@redhat.com>
Cc: Glibc hackers <libc-hacker@sources.redhat.com>
Subject: [PATCH] Some warning fixes from --enable-kernel=2.6.22 build
Date: Mon, 13 Aug 2007 14:04:00 -0000 [thread overview]
Message-ID: <20070813141031.GN4603@sunsite.mff.cuni.cz> (raw)
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 <jakub@redhat.com>
* 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 <dl-hash.h>
#include <ldsodefs.h>
--- 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 <assert.h>
-#include <dl-hash.h>
#include <ldsodefs.h>
+#ifdef NDEBUG
+# define CHECK_HASH(var) do {} while (0)
+#else
+# include <dl-hash.h>
+# 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 <drepper@redhat.com>, 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 <drepper@redhat.com>, 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 <ldsodefs.h>
-#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
reply other threads:[~2007-08-13 14:04 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070813141031.GN4603@sunsite.mff.cuni.cz \
--to=jakub@redhat.com \
--cc=drepper@redhat.com \
--cc=libc-hacker@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).