forked from Imagelibrary/binutils-gdb
-Wpointer-sign: coff-pe-read.c: treat strings in PE/COFF data as char *.
A couple places take a pointer to the middle of some raw section buffer and treat them as strings. Add casts to char * as appropriate, fixing -Wpointer-sign warnings. gdb/ 2013-04-19 Pedro Alves <palves@redhat.com> * coff-pe-read.c (read_pe_exported_syms): Handle strings as char.
This commit is contained in:
@@ -1,3 +1,7 @@
|
|||||||
|
2013-04-19 Pedro Alves <palves@redhat.com>
|
||||||
|
|
||||||
|
* coff-pe-read.c (read_pe_exported_syms): Handle strings as char.
|
||||||
|
|
||||||
2013-04-19 Pedro Alves <palves@redhat.com>
|
2013-04-19 Pedro Alves <palves@redhat.com>
|
||||||
|
|
||||||
* record-full.c (record_full_get_bookmark): Change local 'ret'
|
* record-full.c (record_full_get_bookmark): Change local 'ret'
|
||||||
|
|||||||
@@ -505,7 +505,7 @@ read_pe_exported_syms (struct objfile *objfile)
|
|||||||
exp_funcbase = pe_as32 (expdata + 28);
|
exp_funcbase = pe_as32 (expdata + 28);
|
||||||
|
|
||||||
/* Use internal dll name instead of full pathname. */
|
/* Use internal dll name instead of full pathname. */
|
||||||
dll_name = pe_as32 (expdata + 12) + erva;
|
dll_name = (char *) (pe_as32 (expdata + 12) + erva);
|
||||||
|
|
||||||
pe_sections_info.nb_sections = otherix;
|
pe_sections_info.nb_sections = otherix;
|
||||||
pe_sections_info.sections = section_data;
|
pe_sections_info.sections = section_data;
|
||||||
@@ -579,9 +579,10 @@ read_pe_exported_syms (struct objfile *objfile)
|
|||||||
if ((func_rva >= section_data[sectix].rva_start)
|
if ((func_rva >= section_data[sectix].rva_start)
|
||||||
&& (func_rva < section_data[sectix].rva_end))
|
&& (func_rva < section_data[sectix].rva_end))
|
||||||
{
|
{
|
||||||
|
char *sym_name = (char *) (erva + name_rva);
|
||||||
|
|
||||||
section_found = 1;
|
section_found = 1;
|
||||||
add_pe_exported_sym (erva + name_rva,
|
add_pe_exported_sym (sym_name, func_rva, ordinal,
|
||||||
func_rva, ordinal,
|
|
||||||
section_data + sectix, dll_name, objfile);
|
section_data + sectix, dll_name, objfile);
|
||||||
++nbnormal;
|
++nbnormal;
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user