]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
* stdlib/tst-strtod2.c (do_test): Use %tu in fmt string for ptrdiff_t
authorUlrich Drepper <drepper@redhat.com>
Wed, 1 Aug 2007 03:44:35 +0000 (03:44 +0000)
committerUlrich Drepper <drepper@redhat.com>
Wed, 1 Aug 2007 03:44:35 +0000 (03:44 +0000)
value.

* stdio-common/tst-fmemopen2.c (do_test): Avoid fmt string warning
if off_t is different rank from size_t.

* sysdeps/generic/unwind-dw2.c (extract_cie_info, execute_cfa_program,
uw_frame_state_for): Avoid type punning warnings.
* sysdeps/generic/unwind-dw2-fde-glibc.c
(_Unwind_IteratePhdrCallback): Likewise.
* sysdeps/generic/unwind-dw2-fde.c (_Unwind_Find_FDE): Likewise.
(binary_search_single_encoding_fdes, binary_search_mixed_encoding_fdes,
get_cie_encoding, linear_search_fdes): Don't mix char and unsigned char
pointers.

ChangeLog
localedata/ChangeLog
localedata/tst-strptime.c
nptl/ChangeLog
nptl/tst-rwlock14.c
stdio-common/tst-fmemopen2.c
stdlib/tst-strtod2.c
sysdeps/generic/unwind-dw2-fde-glibc.c
sysdeps/generic/unwind-dw2-fde.c
sysdeps/generic/unwind-dw2.c

index 3a68c88172702a949510683d84551464130c0df2..7661c1e44d39a14b182eeca6282370c75f3e2d5e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+2007-07-30  Jakub Jelinek  <jakub@redhat.com>
+
+       * stdlib/tst-strtod2.c (do_test): Use %tu in fmt string for ptrdiff_t
+       value.
+
+       * stdio-common/tst-fmemopen2.c (do_test): Avoid fmt string warning
+       if off_t is different rank from size_t.
+
+       * sysdeps/generic/unwind-dw2.c (extract_cie_info, execute_cfa_program,
+       uw_frame_state_for): Avoid type punning warnings.
+       * sysdeps/generic/unwind-dw2-fde-glibc.c
+       (_Unwind_IteratePhdrCallback): Likewise.
+       * sysdeps/generic/unwind-dw2-fde.c (_Unwind_Find_FDE): Likewise.
+       (binary_search_single_encoding_fdes, binary_search_mixed_encoding_fdes,
+       get_cie_encoding, linear_search_fdes): Don't mix char and unsigned char
+       pointers.
+
 2007-07-31  Ulrich Drepper  <drepper@redhat.com>
 
        * sysdeps/unix/sysv/linux/getsysstats.c (__get_nprocs_conf): Count
index 7a7a62fa2ff79edc67b2c5d6a8427727f318a318..8eae5da34fabb79d7bd1b5906366591ad382a421 100644 (file)
@@ -1,3 +1,7 @@
+2007-07-30  Jakub Jelinek  <jakub@redhat.com>
+
+       * tst-strptime.c (do_test): Use %tu in fmt string for ptrdiff_t value.
+
 2007-07-16  Jakub Jelinek  <jakub@redhat.com>
 
        * locales/ar_SA (d_t_fmt, d_fmt, t_fmt, t_fmt_ampm): Replace %.1d
index 4ee4fcb78d96ade9811ea8573311154d5d4928da..b5ab232d7e6287ab074ed089d41087ca238260c7 100644 (file)
@@ -15,7 +15,7 @@ do_test (void)
   static const char s[] = "\
 \x54\x68\xb8\x6e\x67\x20\x6d\xad\xea\x69\x20\x6d\xe9\x74";
   char *r = strptime (s, "%b", &tm);
-  printf ("r = %p, r-s = %ju, tm.tm_mon = %d\n", r, r - s, tm.tm_mon);
+  printf ("r = %p, r-s = %tu, tm.tm_mon = %d\n", r, r - s, tm.tm_mon);
   return r == NULL || r - s != 14 || tm.tm_mon != 10;
 }
 
index eda7e806137325ff2a94776f185724f7e5bcf46d..7ad935c96d9c31620a7930211bf842adf46708d8 100644 (file)
@@ -1,5 +1,7 @@
 2007-07-30  Jakub Jelinek  <jakub@redhat.com>
 
+       * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
+
        * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
        (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
        %ecx.
index fc0d3d219f7de15a64837d3a4e8fb2cdee685d38..00e1becbfaeb59e3010dbcf125cc36638dafe2b1 100644 (file)
@@ -1,4 +1,4 @@
-/* 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 Ulrich Drepper <drepper@redhat.com>, 2004.
 
@@ -130,8 +130,8 @@ do_test (void)
       result = 1;
     }
 
-  ts.tv_nsec = 0x100001000LL;
-  if (ts.tv_nsec != 0x100001000LL)
+  ts.tv_nsec = (__typeof (ts.tv_nsec)) 0x100001000LL;
+  if ((__typeof (ts.tv_nsec)) 0x100001000LL != 0x100001000LL)
     ts.tv_nsec = 2000000000;
 
   e = pthread_rwlock_timedrdlock (&r, &ts);
index 81beddddef9cd71fcad65a9ad98de7604bf1a090..c2a4baace9c83604359c77abe2ee3c935125ef2d 100644 (file)
@@ -28,7 +28,7 @@ do_test (void)
   o = ftello (fp);
   if (o != 0)
     {
-      printf ("second ftello returned %ld, expected %zu\n", o, (off_t) 0);
+      printf ("second ftello returned %ld, expected 0\n", o);
       result = 1;
     }
   if (fseeko (fp, 0, SEEK_END) != 0)
index 30d8d9df6535089f2f5114a9d7d15ba92f59a2db..a7df82ebbde14c5f624d4fdf397ee00ec218e122 100644 (file)
@@ -32,7 +32,7 @@ do_test (void)
        }
       if (ep != tests[i].str + tests[i].offset)
        {
-         printf ("test %zu strtod parsed %ju characters, expected %zu\n",
+         printf ("test %zu strtod parsed %tu characters, expected %zu\n",
                  i, ep - tests[i].str, tests[i].offset);
          status = 1;
        }
index 0038a0cbf6213300efdebda577c76e5e812f902d..932a9727430aba6abb676b2e2bec31c1112e457e 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 2001, 2002, 2007 Free Software Foundation, Inc.
    Contributed by Jakub Jelinek <jakub@redhat.com>.
 
    This file is part of the GNU C Library.
@@ -235,10 +235,11 @@ _Unwind_IteratePhdrCallback (struct dl_phdr_info *info, size_t size, void *ptr)
   if (data->ret != NULL)
     {
       unsigned int encoding = get_fde_encoding (data->ret);
+      _Unwind_Ptr func;
       read_encoded_value_with_base (encoding,
                                    base_from_cb_data (encoding, data),
-                                   data->ret->pc_begin,
-                                   (_Unwind_Ptr *)&data->func);
+                                   data->ret->pc_begin, &func);
+      data->func = (void *) func;
     }
   return 1;
 }
index 13945b97198e8617005bda6e12ffd2573272c809..8d62e4611461eac625304561ce40e6274a366c00 100644 (file)
@@ -1,5 +1,5 @@
 /* Subroutines needed for unwinding stack frames for exception handling.  */
-/* Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2006
+/* Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2006, 2007
    Free Software Foundation, Inc.
    Contributed by Jason Merrill <jason@cygnus.com>.
 
@@ -301,7 +301,8 @@ get_cie_encoding (struct dwarf_cie *cie)
   if (aug[0] != 'z')
     return DW_EH_PE_absptr;
 
-  p = aug + strlen (aug) + 1;          /* Skip the augmentation string.  */
+  /* Skip the augmentation string.  */
+  p = aug + strlen ((const char *) aug) + 1;
   p = read_uleb128 (p, &utmp);         /* Skip code alignment.  */
   p = read_sleb128 (p, &stmp);         /* Skip data alignment.  */
   p++;                                 /* Skip return address column.  */
@@ -838,7 +839,7 @@ linear_search_fdes (struct object *ob, fde *this_fde, void *pc)
       else
        {
          _Unwind_Ptr mask;
-         const char *p;
+         const unsigned char *p;
 
          p = read_encoded_value_with_base (encoding, base,
                                            this_fde->pc_begin, &pc_begin);
@@ -908,7 +909,7 @@ binary_search_single_encoding_fdes (struct object *ob, void *pc)
       size_t i = (lo + hi) / 2;
       fde *f = vec->array[i];
       _Unwind_Ptr pc_begin, pc_range;
-      const char *p;
+      const unsigned char *p;
 
       p = read_encoded_value_with_base (encoding, base, f->pc_begin,
                                        &pc_begin);
@@ -936,7 +937,7 @@ binary_search_mixed_encoding_fdes (struct object *ob, void *pc)
       size_t i = (lo + hi) / 2;
       fde *f = vec->array[i];
       _Unwind_Ptr pc_begin, pc_range;
-      const char *p;
+      const unsigned char *p;
       int encoding;
 
       encoding = get_fde_encoding (f);
@@ -1046,6 +1047,7 @@ _Unwind_Find_FDE (void *pc, struct dwarf_eh_bases *bases)
   if (f)
     {
       int encoding;
+      _Unwind_Ptr func;
 
       bases->tbase = ob->tbase;
       bases->dbase = ob->dbase;
@@ -1054,7 +1056,8 @@ _Unwind_Find_FDE (void *pc, struct dwarf_eh_bases *bases)
       if (ob->s.b.mixed_encoding)
        encoding = get_fde_encoding (f);
       read_encoded_value_with_base (encoding, base_from_object (encoding, ob),
-                                   f->pc_begin, (_Unwind_Ptr *)&bases->func);
+                                   f->pc_begin, &func);
+      bases->func = (void *) func;
     }
 
   return f;
index d818e5dfd86bdf38d812711fe4186c67a08d4228..ba5723aa62f744ab22e2dd83ffc2bbeda67e432e 100644 (file)
@@ -1,5 +1,5 @@
 /* DWARF2 exception handling and frame unwind runtime interface routines.
-   Copyright (C) 1997,1998,1999,2000,2001,2002,2003,2005,2006
+   Copyright (C) 1997,1998,1999,2000,2001,2002,2003,2005,2006,2007
        Free Software Foundation, Inc.
 
    This file is part of the GNU C Library.
@@ -309,8 +309,9 @@ extract_cie_info (struct dwarf_cie *cie, struct _Unwind_Context *context,
       /* "P" indicates a personality routine in the CIE augmentation.  */
       else if (aug[0] == 'P')
        {
-         p = read_encoded_value (context, *p, p + 1,
-                                 (_Unwind_Ptr *) &fs->personality);
+         _Unwind_Ptr personality;
+         p = read_encoded_value (context, *p, p + 1, &personality);
+         fs->personality = (_Unwind_Personality_Fn) personality;
          aug += 1;
        }
 
@@ -771,8 +772,12 @@ execute_cfa_program (const unsigned char *insn_ptr,
       else switch (insn)
        {
        case DW_CFA_set_loc:
-         insn_ptr = read_encoded_value (context, fs->fde_encoding,
-                                        insn_ptr, (_Unwind_Ptr *) &fs->pc);
+         {
+           _Unwind_Ptr pc;
+           insn_ptr = read_encoded_value (context, fs->fde_encoding,
+                                          insn_ptr, &pc);
+           fs->pc = (void *) pc;
+         }
          break;
 
        case DW_CFA_advance_loc1:
@@ -992,8 +997,11 @@ uw_frame_state_for (struct _Unwind_Context *context, _Unwind_FrameState *fs)
       insn = aug + i;
     }
   if (fs->lsda_encoding != DW_EH_PE_omit)
-    aug = read_encoded_value (context, fs->lsda_encoding, aug,
-                             (_Unwind_Ptr *) &context->lsda);
+    {
+      _Unwind_Ptr lsda;
+      aug = read_encoded_value (context, fs->lsda_encoding, aug, &lsda);
+      context->lsda = (void *) lsda;
+    }
 
   /* Then the insns in the FDE up to our target PC.  */
   if (insn == NULL)