about summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2007-07-28 20:36:21 +0000
committerUlrich Drepper <drepper@redhat.com>2007-07-28 20:36:21 +0000
commit701666b77d9bc02a8dce61adcf02d2b929a2f95a (patch)
tree19b4f5a9331a98618b75951a0478c23202d896ef
parent085a44122074e67d56dca0c4f88f01d450ae82ad (diff)
downloadglibc-701666b77d9bc02a8dce61adcf02d2b929a2f95a.tar.gz
glibc-701666b77d9bc02a8dce61adcf02d2b929a2f95a.tar.xz
glibc-701666b77d9bc02a8dce61adcf02d2b929a2f95a.zip
* nss/nsswitch.c (__nss_lookup_function): Don't cast &ni->known to
	void **.
	* nss/nsswitch.h (service_user): Use void * type for KNOWN field.

	* nss/nss_files/files-hosts.c (LINE_PARSER): Cast host_addr to
	char * to avoid warning.
	* nis/nss_nis/nis-hosts.c (LINE_PARSER): Likewise.

	* timezone/Makefile (CFLAGS-zdump.c): Add -fwrapv.

	* locale/programs/ld-ctype.c (ctype_finish, set_class_defaults,
	allocate_arrays): Cast second argument to charmap_find_symbol
	to char * to avoid warnings.

	* locale/programs/repertoire.c (repertoire_new_char): Change
	from_nr, to_nr and cnt to unsigned long, adjust printf format
	string.

	* locale/programs/ld-collate.c (insert_value, handle_ellipsis):
	Cast second argument to new_element to char * to avoid warnings.

	* locale/weightwc.h (findidx): Cast &extra[-i] to const int32_t *.

	* intl/gettextP.h (struct loaded_domain): Change plural to const
	struct expression *.
	* intl/plural-eval.c (plural_eval): Change first argument to
	const struct expression *.
	* intl/plural-exp.c (EXTRACT_PLURAL_EXPRESSION): Change first
	argument to const struct expression **.
	* intl/plural-exp.h (EXTRACT_PLURAL_EXPRESSION, plural_eval): Adjust
	prototypes.
	* intl/loadmsgcat (_nl_unload_domain): Cast away const
	in call to __gettext_free_exp.

	* posix/fnmatch.c (fnmatch): Rearrange code to avoid maybe
	unitialized wstring/wpattern var warnings.

	* posix/runtests.c (struct a_test): Make data field const char *.

	* stdio-common/tst-sprintf2.c (main): Don't declere u, v and buf
	vars if not LDBL_MANT_DIG >= 106.

	* stdio-common/Makefile (CFLAGS-vfwprintf.c): Add -Wno-unitialized.

	* stdio-common/vfprintf.c (vfprintf): Cast first arugment to
	__find_specmb to avoid warning.

	* rt/tst-mqueue1.c (do_one_test): Add casts to avoid warnings.

	* debug/test-strcpy_chk.c (do_tests, do_random_tests): Add casts
	to avoid warnings.

	* sysdeps/ieee754/ldbl-96/s_roundl.c (huge): Add L suffix to
	initializer.

	* sysdeps/unix/clock_gettime.c (clock_gettime): Only define
	tv var when it will be actually used.

	* sunrpc/rpc_cmsg.c (xdr_callmsg): Cast IXDR_PUT_* to void
	to avoid warnings.
-rw-r--r--ChangeLog61
-rw-r--r--debug/test-strcpy_chk.c11
-rw-r--r--intl/gettextP.h5
-rw-r--r--intl/loadmsgcat.c2
-rw-r--r--intl/plural-eval.c6
-rw-r--r--intl/plural-exp.c4
-rw-r--r--intl/plural-exp.h11
-rw-r--r--locale/programs/ld-collate.c6
-rw-r--r--locale/programs/ld-ctype.c10
-rw-r--r--locale/programs/repertoire.c6
-rw-r--r--locale/weightwc.h4
-rw-r--r--nis/nss_nis/nis-hosts.c2
-rw-r--r--nptl/tst-locale2.c1
-rw-r--r--nss/nss_files/files-hosts.c2
-rw-r--r--nss/nsswitch.c4
-rw-r--r--nss/nsswitch.h5
-rw-r--r--posix/fnmatch.c16
-rw-r--r--posix/runtests.c2
-rw-r--r--rt/tst-mqueue1.c22
-rw-r--r--stdio-common/Makefile1
-rw-r--r--stdio-common/tst-sprintf2.c2
-rw-r--r--stdio-common/vfprintf.c2
-rw-r--r--sunrpc/rpc_cmsg.c20
-rw-r--r--sysdeps/ieee754/ldbl-96/s_roundl.c4
-rw-r--r--sysdeps/unix/clock_gettime.c12
-rw-r--r--timezone/Makefile5
26 files changed, 155 insertions, 71 deletions
diff --git a/ChangeLog b/ChangeLog
index 1c0e7392ef..0e06c0721e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,66 @@
 2007-07-26  Jakub Jelinek  <jakub@redhat.com>
 
+	* nss/nsswitch.c (__nss_lookup_function): Don't cast &ni->known to
+	void **.
+	* nss/nsswitch.h (service_user): Use void * type for KNOWN field.
+
+	* nss/nss_files/files-hosts.c (LINE_PARSER): Cast host_addr to
+	char * to avoid warning.
+	* nis/nss_nis/nis-hosts.c (LINE_PARSER): Likewise.
+
+	* timezone/Makefile (CFLAGS-zdump.c): Add -fwrapv.
+
+	* locale/programs/ld-ctype.c (ctype_finish, set_class_defaults,
+	allocate_arrays): Cast second argument to charmap_find_symbol
+	to char * to avoid warnings.
+
+	* locale/programs/repertoire.c (repertoire_new_char): Change
+	from_nr, to_nr and cnt to unsigned long, adjust printf format
+	string.
+
+	* locale/programs/ld-collate.c (insert_value, handle_ellipsis):
+	Cast second argument to new_element to char * to avoid warnings.
+
+	* locale/weightwc.h (findidx): Cast &extra[-i] to const int32_t *.
+
+	* intl/gettextP.h (struct loaded_domain): Change plural to const
+	struct expression *.
+	* intl/plural-eval.c (plural_eval): Change first argument to
+	const struct expression *.
+	* intl/plural-exp.c (EXTRACT_PLURAL_EXPRESSION): Change first
+	argument to const struct expression **.
+	* intl/plural-exp.h (EXTRACT_PLURAL_EXPRESSION, plural_eval): Adjust
+	prototypes.
+	* intl/loadmsgcat (_nl_unload_domain): Cast away const
+	in call to __gettext_free_exp.
+
+	* posix/fnmatch.c (fnmatch): Rearrange code to avoid maybe
+	unitialized wstring/wpattern var warnings.
+
+	* posix/runtests.c (struct a_test): Make data field const char *.
+
+	* stdio-common/tst-sprintf2.c (main): Don't declere u, v and buf
+	vars if not LDBL_MANT_DIG >= 106.
+
+	* stdio-common/Makefile (CFLAGS-vfwprintf.c): Add -Wno-unitialized.
+
+	* stdio-common/vfprintf.c (vfprintf): Cast first arugment to
+	__find_specmb to avoid warning.
+
+	* rt/tst-mqueue1.c (do_one_test): Add casts to avoid warnings.
+
+	* debug/test-strcpy_chk.c (do_tests, do_random_tests): Add casts
+	to avoid warnings.
+
+	* sysdeps/ieee754/ldbl-96/s_roundl.c (huge): Add L suffix to
+	initializer.
+
+	* sysdeps/unix/clock_gettime.c (clock_gettime): Only define
+	tv var when it will be actually used.
+
+	* sunrpc/rpc_cmsg.c (xdr_callmsg): Cast IXDR_PUT_* to void
+	to avoid warnings.
+
 	* iconvdata/gbk.c (BODY): Make buf and cp char instead of unsigned
 	char array resp. pointer.
 	* iconvdata/iso-2022-kr.c (BODY): Make buf unsigned char instead of
diff --git a/debug/test-strcpy_chk.c b/debug/test-strcpy_chk.c
index ac9f9448cf..e08141dad0 100644
--- a/debug/test-strcpy_chk.c
+++ b/debug/test-strcpy_chk.c
@@ -141,8 +141,8 @@ do_test (size_t align1, size_t align2, size_t len, size_t dlen, int max_char)
   if (align2 + len >= page_size)
     return;
 
-  s1 = buf1 + align1;
-  s2 = buf2 + align2;
+  s1 = (char *) buf1 + align1;
+  s2 = (char *) buf2 + align2;
 
   for (i = 0; i < len; i++)
     s1[i] = 32 + 23 * i % (max_char - 32);
@@ -233,7 +233,9 @@ do_random_tests (void)
 		  chk_fail_ok = 1;
 		  if (setjmp (chk_fail_buf) == 0)
 		    {
-		      res = CALL (impl, p2 + align2, p1 + align1, dlen);
+		      res = (unsigned char *)
+			    CALL (impl, (char *) p2 + align2,
+				  (char *) p1 + align1, dlen);
 		      printf ("Iteration %zd - did not __chk_fail\n", n);
 		      chk_fail_ok = 0;
 		      ret = 1;
@@ -242,7 +244,8 @@ do_random_tests (void)
 	      continue;
 	    }
 	  memset (p2 - 64, '\1', 512 + 64);
-	  res = CALL (impl, p2 + align2, p1 + align1, dlen);
+	  res = (unsigned char *)
+		CALL (impl, (char *) p2 + align2, (char *) p1 + align1, dlen);
 	  if (res != STRCPY_RESULT (p2 + align2, len))
 	    {
 	      printf ("\
diff --git a/intl/gettextP.h b/intl/gettextP.h
index f18535a5b3..f680a9a0a1 100644
--- a/intl/gettextP.h
+++ b/intl/gettextP.h
@@ -1,5 +1,6 @@
 /* Header describing internals of libintl library.
-   Copyright (C) 1995-1999, 2000, 2001, 2004-2005 Free Software Foundation, Inc.
+   Copyright (C) 1995-1999, 2000, 2001, 2004-2005, 2007
+   Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Written by Ulrich Drepper <drepper@cygnus.com>, 1995.
 
@@ -147,7 +148,7 @@ struct loaded_domain
   struct converted_domain *conversions;
   size_t nconversions;
 
-  struct expression *plural;
+  const struct expression *plural;
   unsigned long int nplurals;
 };
 
diff --git a/intl/loadmsgcat.c b/intl/loadmsgcat.c
index 1f55531097..1c47475ec6 100644
--- a/intl/loadmsgcat.c
+++ b/intl/loadmsgcat.c
@@ -1276,7 +1276,7 @@ _nl_unload_domain (domain)
   size_t i;
 
   if (domain->plural != &__gettext_germanic_plural)
-    __gettext_free_exp (domain->plural);
+    __gettext_free_exp ((struct expression *) domain->plural);
 
   for (i = 0; i < domain->nconversions; i++)
     {
diff --git a/intl/plural-eval.c b/intl/plural-eval.c
index ed29e201b2..3f01688c2e 100644
--- a/intl/plural-eval.c
+++ b/intl/plural-eval.c
@@ -1,5 +1,5 @@
 /* Plural expression evaluation.
-   Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+   Copyright (C) 2000, 2001, 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
@@ -17,14 +17,14 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
-static unsigned long int plural_eval (struct expression *pexp,
+static unsigned long int plural_eval (const struct expression *pexp,
 				      unsigned long int n)
      internal_function;
 
 static unsigned long int
 internal_function
 plural_eval (pexp, n)
-     struct expression *pexp;
+     const struct expression *pexp;
      unsigned long int n;
 {
   switch (pexp->nargs)
diff --git a/intl/plural-exp.c b/intl/plural-exp.c
index 9cb7a4540a..b3eee6b432 100644
--- a/intl/plural-exp.c
+++ b/intl/plural-exp.c
@@ -1,5 +1,5 @@
 /* Expression parsing for plural form selection.
-   Copyright (C) 2000, 2001, 2005 Free Software Foundation, Inc.
+   Copyright (C) 2000, 2001, 2005, 2007 Free Software Foundation, Inc.
    Written by Ulrich Drepper <drepper@cygnus.com>, 2000.
    This file is part of the GNU C Library.
 
@@ -99,7 +99,7 @@ void
 internal_function
 EXTRACT_PLURAL_EXPRESSION (nullentry, pluralp, npluralsp)
      const char *nullentry;
-     struct expression **pluralp;
+     const struct expression **pluralp;
      unsigned long int *npluralsp;
 {
   if (nullentry != NULL)
diff --git a/intl/plural-exp.h b/intl/plural-exp.h
index f8a5c87ff0..4a7336e26b 100644
--- a/intl/plural-exp.h
+++ b/intl/plural-exp.h
@@ -1,5 +1,5 @@
 /* Expression parsing and evaluation for plural form selection.
-   Copyright (C) 2000, 2001, 2002, 2005 Free Software Foundation, Inc.
+   Copyright (C) 2000, 2001, 2002, 2005, 2007 Free Software Foundation, Inc.
    Written by Ulrich Drepper <drepper@cygnus.com>, 2000.
    This file is part of the GNU C Library.
 
@@ -114,13 +114,12 @@ extern void FREE_EXPRESSION PARAMS ((struct expression *exp))
      internal_function;
 extern int PLURAL_PARSE PARAMS ((void *arg));
 extern const struct expression GERMANIC_PLURAL attribute_hidden;
-extern void EXTRACT_PLURAL_EXPRESSION PARAMS ((const char *nullentry,
-					       struct expression **pluralp,
-					       unsigned long int *npluralsp))
-     internal_function;
+extern void EXTRACT_PLURAL_EXPRESSION PARAMS
+  ((const char *nullentry, const struct expression **pluralp,
+    unsigned long int *npluralsp)) internal_function;
 
 #if !defined (_LIBC) && !defined (IN_LIBINTL)
-extern unsigned long int plural_eval PARAMS ((struct expression *pexp,
+extern unsigned long int plural_eval PARAMS ((const struct expression *pexp,
 					      unsigned long int n));
 #endif
 
diff --git a/locale/programs/ld-collate.c b/locale/programs/ld-collate.c
index 3d1199d372..09237ea38c 100644
--- a/locale/programs/ld-collate.c
+++ b/locale/programs/ld-collate.c
@@ -990,7 +990,8 @@ insert_value (struct linereader *ldfile, const char *symstr, size_t symlen,
 	  uint32_t wcs[2] = { wc, 0 };
 
 	  /* We have to allocate an entry.  */
-	  elem = new_element (collate, seq != NULL ? seq->bytes : NULL,
+	  elem = new_element (collate,
+			      seq != NULL ? (char *) seq->bytes : NULL,
 			      seq != NULL ? seq->nbytes : 0,
 			      wc == ILLEGAL_CHAR_VALUE ? NULL : wcs,
 			      symstr, symlen, 1);
@@ -1385,7 +1386,8 @@ order for `%.*s' already defined at %s:%Zu"),
 
 		      /* We have to allocate an entry.  */
 		      elem = new_element (collate,
-					  seq != NULL ? seq->bytes : NULL,
+					  seq != NULL
+					  ? (char *) seq->bytes : NULL,
 					  seq != NULL ? seq->nbytes : 0,
 					  wc == ILLEGAL_CHAR_VALUE
 					  ? NULL : wcs, buf, lenfrom, 1);
diff --git a/locale/programs/ld-ctype.c b/locale/programs/ld-ctype.c
index 891c110002..d4474bf1a2 100644
--- a/locale/programs/ld-ctype.c
+++ b/locale/programs/ld-ctype.c
@@ -649,7 +649,8 @@ character <SP> not defined in character map")));
 	    /* Find the UCS value for `bytes'.  */
 	    int inner;
 	    uint32_t wch;
-	    struct charseq *seq = charmap_find_symbol (charmap, bytes, nbytes);
+	    struct charseq *seq
+	      = charmap_find_symbol (charmap, (char *) bytes, nbytes);
 
 	    if (seq == NULL)
 	      wch = ILLEGAL_CHAR_VALUE;
@@ -750,7 +751,7 @@ character <SP> not defined in character map")));
       for (cnt = 0; cnt < 10; ++cnt)
 	{
 	  ctype->mbdigits[cnt] = charmap_find_symbol (charmap,
-						      digits + cnt, 1);
+						      (char *) digits + cnt, 1);
 	  if (ctype->mbdigits[cnt] == NULL)
 	    {
 	      ctype->mbdigits[cnt] = charmap_find_symbol (charmap,
@@ -3470,7 +3471,8 @@ set_class_defaults (struct locale_ctype_t *ctype,
       for (cnt = ctype->outdigits_act; cnt < 10; ++cnt)
 	{
 	  ctype->mboutdigits[cnt] = charmap_find_symbol (charmap,
-							 digits + cnt, 1);
+							 (char *) digits + cnt,
+							 1);
 
 	  if (ctype->mboutdigits[cnt] == NULL)
 	    ctype->mboutdigits[cnt] = charmap_find_symbol (charmap,
@@ -4025,7 +4027,7 @@ allocate_arrays (struct locale_ctype_t *ctype, const struct charmap_t *charmap,
 		int inner;
 		uint32_t wch;
 		struct charseq *seq =
-		  charmap_find_symbol (charmap, bytes, nbytes);
+		  charmap_find_symbol (charmap, (char *) bytes, nbytes);
 
 		if (seq == NULL)
 		  wch = ILLEGAL_CHAR_VALUE;
diff --git a/locale/programs/repertoire.c b/locale/programs/repertoire.c
index 03eed4acf5..cc83374c9f 100644
--- a/locale/programs/repertoire.c
+++ b/locale/programs/repertoire.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998-2002,2004,2005 Free Software Foundation, Inc.
+/* Copyright (C) 1998-2002,2004,2005,2007 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
 
@@ -393,7 +393,7 @@ repertoire_new_char (struct linereader *lr, hash_table *ht, hash_table *rt,
   const char *cp;
   char *buf = NULL;
   int prefix_len, len1, len2;
-  unsigned int from_nr, to_nr, cnt;
+  unsigned long int from_nr, to_nr, cnt;
 
   if (to == NULL)
     {
@@ -462,7 +462,7 @@ hexadecimal range format should use only capital characters"));
     {
       uint32_t this_value = value + (cnt - from_nr);
 
-      obstack_printf (ob, decimal_ellipsis ? "%.*s%0*d" : "%.*s%0*X",
+      obstack_printf (ob, decimal_ellipsis ? "%.*s%0*ld" : "%.*s%0*lX",
 		      prefix_len, from, len1 - prefix_len, cnt);
       obstack_1grow (ob, '\0');
 
diff --git a/locale/weightwc.h b/locale/weightwc.h
index 436aa7e548..9ea1126a24 100644
--- a/locale/weightwc.h
+++ b/locale/weightwc.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2001,2003,2004,2005 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2001,2003,2004,2005,2007 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Written by Ulrich Drepper, <drepper@cygnus.com>.
 
@@ -31,7 +31,7 @@ findidx (const wint_t **cpp)
 
   /* Oh well, more than one sequence starting with this byte.
      Search for the correct one.  */
-  const int32_t *cp = &extra[-i];
+  const int32_t *cp = (const int32_t *) &extra[-i];
   while (1)
     {
       size_t nhere;
diff --git a/nis/nss_nis/nis-hosts.c b/nis/nss_nis/nis-hosts.c
index bde0a3291f..7bf4af786d 100644
--- a/nis/nss_nis/nis-hosts.c
+++ b/nis/nss_nis/nis-hosts.c
@@ -88,7 +88,7 @@ LINE_PARSER
      return 0;
 
    /* Store a pointer to the address in the expected form.  */
-   entdata->h_addr_ptrs[0] = entdata->host_addr;
+   entdata->h_addr_ptrs[0] = (char *) entdata->host_addr;
    entdata->h_addr_ptrs[1] = NULL;
    result->h_addr_list = entdata->h_addr_ptrs;
 
diff --git a/nptl/tst-locale2.c b/nptl/tst-locale2.c
index c8821ad6b8..a238209f87 100644
--- a/nptl/tst-locale2.c
+++ b/nptl/tst-locale2.c
@@ -11,4 +11,5 @@ useless (void *a)
 {
   pthread_t th;
   pthread_create (&th, 0, useless, a);
+  return NULL;
 }
diff --git a/nss/nss_files/files-hosts.c b/nss/nss_files/files-hosts.c
index 7b7aadeaab..b06467225b 100644
--- a/nss/nss_files/files-hosts.c
+++ b/nss/nss_files/files-hosts.c
@@ -86,7 +86,7 @@ LINE_PARSER
    result->h_length = af == AF_INET ? INADDRSZ : IN6ADDRSZ;
 
    /* Store a pointer to the address in the expected form.  */
-   entdata->h_addr_ptrs[0] = entdata->host_addr;
+   entdata->h_addr_ptrs[0] = (char *) entdata->host_addr;
    entdata->h_addr_ptrs[1] = NULL;
    result->h_addr_list = entdata->h_addr_ptrs;
 
diff --git a/nss/nsswitch.c b/nss/nsswitch.c
index 756204bd37..46965fd8ff 100644
--- a/nss/nsswitch.c
+++ b/nss/nsswitch.c
@@ -281,7 +281,7 @@ __nss_lookup_function (service_user *ni, const char *fct_name)
      enough to a pointer to our structure to use as a lookup key that
      will be passed to `known_compare' (above).  */
 
-  found = __tsearch (&fct_name, (void **) &ni->known, &known_compare);
+  found = __tsearch (&fct_name, &ni->known, &known_compare);
   if (*found != &fct_name)
     /* The search found an existing structure in the tree.  */
     result = ((known_function *) *found)->fct_ptr;
@@ -298,7 +298,7 @@ __nss_lookup_function (service_user *ni, const char *fct_name)
 	remove_from_tree:
 	  /* Oops.  We can't instantiate this node properly.
 	     Remove it from the tree.  */
-	  __tdelete (&fct_name, (void **) &ni->known, &known_compare);
+	  __tdelete (&fct_name, &ni->known, &known_compare);
 	  result = NULL;
 	}
       else
diff --git a/nss/nsswitch.h b/nss/nsswitch.h
index 96568c69a6..d222e0d443 100644
--- a/nss/nsswitch.h
+++ b/nss/nsswitch.h
@@ -1,4 +1,5 @@
-/* Copyright (C) 1996-1999,2001,2002,2003,2004 Free Software Foundation, Inc.
+/* Copyright (C) 1996-1999,2001,2002,2003,2004,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
@@ -66,7 +67,7 @@ typedef struct service_user
   /* Link to the underlying library object.  */
   service_library *library;
   /* Collection of known functions.  */
-  struct entry *known;
+  void *known;
   /* Name of the service (`files', `dns', `nis', ...).  */
   char name[0];
 } service_user;
diff --git a/posix/fnmatch.c b/posix/fnmatch.c
index c6cdb88772..4baef9e69b 100644
--- a/posix/fnmatch.c
+++ b/posix/fnmatch.c
@@ -351,10 +351,14 @@ fnmatch (pattern, string, flags)
 	       already done?  */
 	    return -1;
 	  if (p)
-	    memset (&ps, '\0', sizeof (ps));
+	    {
+	      memset (&ps, '\0', sizeof (ps));
+	      goto prepare_wpattern;
+	    }
 	}
-      if (__builtin_expect (p != NULL, 0))
+      else
 	{
+	prepare_wpattern:
 	  n = mbsrtowcs (NULL, &pattern, 0, &ps);
 	  if (__builtin_expect (n == (size_t) -1, 0))
 	    /* Something wrong.
@@ -383,10 +387,14 @@ fnmatch (pattern, string, flags)
 	       already done?  */
 	    return -1;
 	  if (p)
-	    memset (&ps, '\0', sizeof (ps));
+	    {
+	      memset (&ps, '\0', sizeof (ps));
+	      goto prepare_wstring;
+	    }
 	}
-      if (__builtin_expect (p != NULL, 0))
+      else
 	{
+	prepare_wstring:
 	  n = mbsrtowcs (NULL, &string, 0, &ps);
 	  if (__builtin_expect (n == (size_t) -1, 0))
 	    /* Something wrong.
diff --git a/posix/runtests.c b/posix/runtests.c
index 9d744751ea..d44bf36266 100644
--- a/posix/runtests.c
+++ b/posix/runtests.c
@@ -36,7 +36,7 @@ struct a_test
 {
   int expected;
   const char * pattern;
-  const unsigned char * data;
+  const char * data;
 };
 
 static const struct a_test the_tests[] =
diff --git a/rt/tst-mqueue1.c b/rt/tst-mqueue1.c
index db4065ea93..9c5d940f99 100644
--- a/rt/tst-mqueue1.c
+++ b/rt/tst-mqueue1.c
@@ -1,5 +1,5 @@
 /* Test message queue passing.
-   Copyright (C) 2004 Free Software Foundation, Inc.
+   Copyright (C) 2004, 2007 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Jakub Jelinek <jakub@redhat.com>, 2004.
 
@@ -85,7 +85,7 @@ do_one_test (mqd_t q, const char *name, int nonblock)
   else
     result |= check_attrs (&attr, nonblock, 0);
 
-  if (mq_receive (q, &v[0], 1, NULL) != -1)
+  if (mq_receive (q, (char *) &v[0], 1, NULL) != -1)
     {
       puts ("mq_receive on O_WRONLY mqd_t unexpectedly succeeded");
       result = 1;
@@ -109,9 +109,9 @@ do_one_test (mqd_t q, const char *name, int nonblock)
   for (int i = 0; i < 10; ++i)
     {
       if (i & 1)
-	ret = mq_send (q, &v[i], 1, v[i] >> 4);
+	ret = mq_send (q, (char *) &v[i], 1, v[i] >> 4);
       else
-	ret = mq_timedsend (q, &v[i], 1, v[i] >> 4, &ts);
+	ret = mq_timedsend (q, (char *) &v[i], 1, v[i] >> 4, &ts);
 
       if (ret)
 	{
@@ -120,7 +120,7 @@ do_one_test (mqd_t q, const char *name, int nonblock)
 	}
     }
 
-  ret = mq_timedsend (q, &v[10], 1, 8, &ts);
+  ret = mq_timedsend (q, (char *) &v[10], 1, 8, &ts);
   if (ret != -1)
     {
       puts ("mq_timedsend on full queue did not fail");
@@ -135,7 +135,7 @@ do_one_test (mqd_t q, const char *name, int nonblock)
 
   if (nonblock)
     {
-      ret = mq_send (q, &v[10], 1, 8);
+      ret = mq_send (q, (char *) &v[10], 1, 8);
       if (ret != -1)
 	{
 	  puts ("mq_send on full non-blocking queue did not fail");
@@ -194,7 +194,7 @@ do_one_test (mqd_t q, const char *name, int nonblock)
       unsigned int prio;
       ssize_t rets;
 
-      if (mq_send (q, &v[0], 1, 1) != -1)
+      if (mq_send (q, (char *) &v[0], 1, 1) != -1)
 	{
 	  puts ("mq_send on O_RDONLY mqd_t unexpectedly succeeded");
 	  result = 1;
@@ -208,9 +208,9 @@ do_one_test (mqd_t q, const char *name, int nonblock)
       for (int i = 0; i < 10; ++i)
 	{
 	  if (i & 1)
-	    rets = mq_receive (q, &vr[i], 1, &prio);
+	    rets = mq_receive (q, (char *) &vr[i], 1, &prio);
 	  else
-	    rets = mq_timedreceive (q, &vr[i], 1, &prio, &ts);
+	    rets = mq_timedreceive (q, (char *) &vr[i], 1, &prio, &ts);
 
 	  if (rets != 1)
 	    {
@@ -236,7 +236,7 @@ do_one_test (mqd_t q, const char *name, int nonblock)
 	  result = 1;
 	}
 
-      rets = mq_timedreceive (q, &vr[10], 1, &prio, &ts);
+      rets = mq_timedreceive (q, (char *) &vr[10], 1, &prio, &ts);
       if (rets != -1)
 	{
 	  puts ("mq_timedreceive on empty queue did not fail");
@@ -251,7 +251,7 @@ do_one_test (mqd_t q, const char *name, int nonblock)
 
       if (nonblock)
 	{
-	  ret = mq_receive (q, &vr[10], 1, &prio);
+	  ret = mq_receive (q, (char *) &vr[10], 1, &prio);
 	  if (ret != -1)
 	    {
 	      puts ("mq_receive on empty non-blocking queue did not fail");
diff --git a/stdio-common/Makefile b/stdio-common/Makefile
index 3388c7e215..104c0e0d91 100644
--- a/stdio-common/Makefile
+++ b/stdio-common/Makefile
@@ -78,6 +78,7 @@ $(objpfx)tst-printf.out: $(objpfx)tst-printf tst-printf.sh
 endif
 
 CFLAGS-vfprintf.c = -Wno-uninitialized
+CFLAGS-vfwprintf.c = -Wno-uninitialized
 CFLAGS-tst-printf.c = -Wno-format
 CFLAGS-tstdiomisc.c = -Wno-format
 CFLAGS-scanf4.c = -Wno-format
diff --git a/stdio-common/tst-sprintf2.c b/stdio-common/tst-sprintf2.c
index debb68e21f..422278dd6a 100644
--- a/stdio-common/tst-sprintf2.c
+++ b/stdio-common/tst-sprintf2.c
@@ -6,8 +6,10 @@
 int
 main (void)
 {
+#if LDBL_MANT_DIG >= 106
   volatile union { long double l; long long x[2]; } u, v;
   char buf[64];
+#endif
   int result = 0;
 
 #if LDBL_MANT_DIG == 106 || LDBL_MANT_DIG == 113
diff --git a/stdio-common/vfprintf.c b/stdio-common/vfprintf.c
index 25edde7511..fae0f7464e 100644
--- a/stdio-common/vfprintf.c
+++ b/stdio-common/vfprintf.c
@@ -1298,7 +1298,7 @@ vfprintf (FILE *s, const CHAR_T *format, va_list ap)
   memset (&mbstate, '\0', sizeof (mbstate_t));
 
   /* Find the first format specifier.  */
-  f = lead_str_end = __find_specmb (format, &mbstate);
+  f = lead_str_end = __find_specmb ((const UCHAR_T *) format, &mbstate);
 #endif
 
   /* Lock stream.  */
diff --git a/sunrpc/rpc_cmsg.c b/sunrpc/rpc_cmsg.c
index dea07536a3..9a7568b55a 100644
--- a/sunrpc/rpc_cmsg.c
+++ b/sunrpc/rpc_cmsg.c
@@ -67,27 +67,27 @@ xdr_callmsg (XDR *xdrs, struct rpc_msg *cmsg)
 			+ RNDUP (cmsg->rm_call.cb_verf.oa_length));
       if (buf != NULL)
 	{
-	  IXDR_PUT_LONG (buf, cmsg->rm_xid);
-	  IXDR_PUT_ENUM (buf, cmsg->rm_direction);
+	  (void) IXDR_PUT_LONG (buf, cmsg->rm_xid);
+	  (void) IXDR_PUT_ENUM (buf, cmsg->rm_direction);
 	  if (cmsg->rm_direction != CALL)
 	    return FALSE;
-	  IXDR_PUT_LONG (buf, cmsg->rm_call.cb_rpcvers);
+	  (void) IXDR_PUT_LONG (buf, cmsg->rm_call.cb_rpcvers);
 	  if (cmsg->rm_call.cb_rpcvers != RPC_MSG_VERSION)
 	    return FALSE;
-	  IXDR_PUT_LONG (buf, cmsg->rm_call.cb_prog);
-	  IXDR_PUT_LONG (buf, cmsg->rm_call.cb_vers);
-	  IXDR_PUT_LONG (buf, cmsg->rm_call.cb_proc);
+	  (void) IXDR_PUT_LONG (buf, cmsg->rm_call.cb_prog);
+	  (void) IXDR_PUT_LONG (buf, cmsg->rm_call.cb_vers);
+	  (void) IXDR_PUT_LONG (buf, cmsg->rm_call.cb_proc);
 	  oa = &cmsg->rm_call.cb_cred;
-	  IXDR_PUT_ENUM (buf, oa->oa_flavor);
-	  IXDR_PUT_INT32 (buf, oa->oa_length);
+	  (void) IXDR_PUT_ENUM (buf, oa->oa_flavor);
+	  (void) IXDR_PUT_INT32 (buf, oa->oa_length);
 	  if (oa->oa_length)
 	    {
 	      memcpy ((caddr_t) buf, oa->oa_base, oa->oa_length);
 	      buf = (int32_t *) ((char *) buf + RNDUP (oa->oa_length));
 	    }
 	  oa = &cmsg->rm_call.cb_verf;
-	  IXDR_PUT_ENUM (buf, oa->oa_flavor);
-	  IXDR_PUT_INT32 (buf, oa->oa_length);
+	  (void) IXDR_PUT_ENUM (buf, oa->oa_flavor);
+	  (void) IXDR_PUT_INT32 (buf, oa->oa_length);
 	  if (oa->oa_length)
 	    {
 	      memcpy ((caddr_t) buf, oa->oa_base, oa->oa_length);
diff --git a/sysdeps/ieee754/ldbl-96/s_roundl.c b/sysdeps/ieee754/ldbl-96/s_roundl.c
index 672536d358..f1399cc209 100644
--- a/sysdeps/ieee754/ldbl-96/s_roundl.c
+++ b/sysdeps/ieee754/ldbl-96/s_roundl.c
@@ -1,5 +1,5 @@
 /* Round long double to integer away from zero.
-   Copyright (C) 1997 Free Software Foundation, Inc.
+   Copyright (C) 1997, 2007 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
 
@@ -23,7 +23,7 @@
 #include "math_private.h"
 
 
-static const long double huge = 1.0e4930;
+static const long double huge = 1.0e4930L;
 
 
 long double
diff --git a/sysdeps/unix/clock_gettime.c b/sysdeps/unix/clock_gettime.c
index f698f0151b..fbaaf301e4 100644
--- a/sysdeps/unix/clock_gettime.c
+++ b/sysdeps/unix/clock_gettime.c
@@ -1,5 +1,5 @@
 /* clock_gettime -- Get the current time from a POSIX clockid_t.  Unix version.
-   Copyright (C) 1999-2004, 2005 Free Software Foundation, Inc.
+   Copyright (C) 1999-2004, 2005, 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
@@ -93,7 +93,6 @@ int
 clock_gettime (clockid_t clock_id, struct timespec *tp)
 {
   int retval = -1;
-  struct timeval tv;
 
   switch (clock_id)
     {
@@ -103,9 +102,12 @@ clock_gettime (clockid_t clock_id, struct timespec *tp)
 
 #ifndef HANDLED_REALTIME
     case CLOCK_REALTIME:
-      retval = gettimeofday (&tv, NULL);
-      if (retval == 0)
-	TIMEVAL_TO_TIMESPEC (&tv, tp);
+      {
+	struct timeval tv;
+	retval = gettimeofday (&tv, NULL);
+	if (retval == 0)
+	  TIMEVAL_TO_TIMESPEC (&tv, tp);
+      }
       break;
 #endif
 
diff --git a/timezone/Makefile b/timezone/Makefile
index 9947d45b17..3d5b73ae9b 100644
--- a/timezone/Makefile
+++ b/timezone/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 1998,1999,2000,2002,2005 Free Software Foundation, Inc.
+# Copyright (C) 1998,1999,2000,2002,2005,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
@@ -166,7 +166,8 @@ tz-cflags = -DTZDIR='"$(zonedir)"' \
 	    -DTZDEFRULES='"$(posixrules-file)"' \
 	    -DTM_GMTOFF=tm_gmtoff -DTM_ZONE=tm_zone
 
-CFLAGS-zdump.c = -Wno-strict-prototypes -DNOID $(tz-cflags) -DHAVE_GETTEXT
+CFLAGS-zdump.c = -fwrapv -Wno-strict-prototypes -DNOID $(tz-cflags) \
+		 -DHAVE_GETTEXT
 CFLAGS-zic.c = -Wno-strict-prototypes -DNOID $(tz-cflags) -DHAVE_GETTEXT
 CFLAGS-ialloc.c = -Wno-strict-prototypes -DNOID -DHAVE_GETTEXT
 CFLAGS-scheck.c = -Wno-strict-prototypes -DNOID -DHAVE_GETTEXT