aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/generic
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2007-08-01 03:44:35 +0000
committerUlrich Drepper <drepper@redhat.com>2007-08-01 03:44:35 +0000
commit1475e2012f267f69dab879ce146f99128fd21653 (patch)
tree811bc01b3abd62840d8b3bc285cca9575d50cba4 /sysdeps/generic
parent6f59d56e61305b665aecbaab1440b07b6c80bdc7 (diff)
downloadglibc-1475e2012f267f69dab879ce146f99128fd21653.zip
glibc-1475e2012f267f69dab879ce146f99128fd21653.tar.gz
glibc-1475e2012f267f69dab879ce146f99128fd21653.tar.bz2
* 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.
Diffstat (limited to 'sysdeps/generic')
-rw-r--r--sysdeps/generic/unwind-dw2-fde-glibc.c7
-rw-r--r--sysdeps/generic/unwind-dw2-fde.c15
-rw-r--r--sysdeps/generic/unwind-dw2.c22
3 files changed, 28 insertions, 16 deletions
diff --git a/sysdeps/generic/unwind-dw2-fde-glibc.c b/sysdeps/generic/unwind-dw2-fde-glibc.c
index 0038a0c..932a972 100644
--- a/sysdeps/generic/unwind-dw2-fde-glibc.c
+++ b/sysdeps/generic/unwind-dw2-fde-glibc.c
@@ -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;
}
diff --git a/sysdeps/generic/unwind-dw2-fde.c b/sysdeps/generic/unwind-dw2-fde.c
index 13945b9..8d62e46 100644
--- a/sysdeps/generic/unwind-dw2-fde.c
+++ b/sysdeps/generic/unwind-dw2-fde.c
@@ -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;
diff --git a/sysdeps/generic/unwind-dw2.c b/sysdeps/generic/unwind-dw2.c
index d818e5d..ba5723a 100644
--- a/sysdeps/generic/unwind-dw2.c
+++ b/sysdeps/generic/unwind-dw2.c
@@ -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)