From 9ba4c445137e7c387090441e2837e09479f14457 Mon Sep 17 00:00:00 2001 From: Jie Zhang Date: Mon, 24 Oct 2005 16:31:22 +0000 Subject: [PATCH] bfd/ * elf32-bfin.c (bfd_bfin_elf32_create_embedded_relocs): Fix signedness warning. gas/ * Makefile.am (bfin-parse.h): Renamed from bfin-parse.tab.h. (EXTRA_DIST): Add bfin-parse.h and bfin-lex.c. * Makefile.in: Regenerate. * config/bfin-lex.l: Include bfin-parse.h instead of bfin-parse.tab.h. * config/tc-bfin.c (md_chars_to_number): Change the type of first argument from unsigned char * to char * to remove signedness warnings. --- bfd/ChangeLog | 5 +++++ bfd/elf32-bfin.c | 2 +- gas/ChangeLog | 9 +++++++++ gas/Makefile.am | 8 ++++---- gas/Makefile.in | 8 ++++---- gas/config/bfin-lex.l | 2 +- gas/config/tc-bfin.c | 6 ++---- 7 files changed, 26 insertions(+), 14 deletions(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 2d98ebd1ecc..d2de1e907f3 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2005-10-24 Jie Zhang + + * elf32-bfin.c (bfd_bfin_elf32_create_embedded_relocs): Fix signedness + warning. + 2005-10-24 Bernd Schmidt * elf32-bfin.c (bfin_howto_table): Set src_mask to 0 for all relocs. diff --git a/bfd/elf32-bfin.c b/bfd/elf32-bfin.c index 7cfefd7c82b..c1a1b7443a1 100644 --- a/bfd/elf32-bfin.c +++ b/bfd/elf32-bfin.c @@ -2764,7 +2764,7 @@ bfd_bfin_elf32_create_embedded_relocs ( bfd_put_32 (abfd, irel->r_offset + datasec->output_offset, p); memset (p + 4, 0, 8); if (targetsec != NULL) - strncpy (p + 4, targetsec->output_section->name, 8); + strncpy ((char *) p + 4, targetsec->output_section->name, 8); } if (isymbuf != NULL && symtab_hdr->contents != (unsigned char *) isymbuf) diff --git a/gas/ChangeLog b/gas/ChangeLog index eeb4ac4a232..9b52eacdcc9 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,12 @@ +2005-10-24 Jie Zhang + + * Makefile.am (bfin-parse.h): Renamed from bfin-parse.tab.h. + (EXTRA_DIST): Add bfin-parse.h and bfin-lex.c. + * Makefile.in: Regenerate. + * config/bfin-lex.l: Include bfin-parse.h instead of bfin-parse.tab.h. + * config/tc-bfin.c (md_chars_to_number): Change the type of first + argument from unsigned char * to char * to remove signedness warnings. + 2005-10-24 Jan Beulich * config/tc-ia64.c (enum reg_symbol): Delete IND_MEM. diff --git a/gas/Makefile.am b/gas/Makefile.am index 45725835869..48f9537ef87 100644 --- a/gas/Makefile.am +++ b/gas/Makefile.am @@ -441,7 +441,7 @@ noinst_SCRIPTS = $(GDBINIT) EXTRA_SCRIPTS = .gdbinit EXTRA_DIST = m68k-parse.c itbl-parse.c itbl-parse.h itbl-lex.c \ - bfin-parse.c + bfin-parse.c bfin-parse.h bfin-lex.c diststuff: $(EXTRA_DIST) info all: info @@ -606,15 +606,15 @@ m68k-parse.h: ; @true $(srcdir)/config/m68k-parse.h: ; @true bfin-parse.c bfin-parse.tab.h: $(srcdir)/config/bfin-parse.y - $(SHELL) $(YLWRAP) $(srcdir)/config/bfin-parse.y y.tab.c bfin-parse.c y.tab.h bfin-parse.tab.h -- $(YACCCOMPILE) -d ; -bfin-parse.o: bfin-parse.c bfin-parse.tab.h $(srcdir)/config/bfin-defs.h + $(SHELL) $(YLWRAP) $(srcdir)/config/bfin-parse.y y.tab.c bfin-parse.c y.tab.h bfin-parse.h -- $(YACCCOMPILE) -d ; +bfin-parse.o: bfin-parse.c bfin-parse.h $(srcdir)/config/bfin-defs.h bfin-defs.h: ; @true $(srcdir)/config/bfin-defs.h: ; @true bfin-lex.c: $(srcdir)/config/bfin-lex.l $(SHELL) $(YLWRAP) $(srcdir)/config/bfin-lex.l lex.yy.c bfin-lex.c -- $(LEXCOMPILE) -bfin-lex.o: bfin-lex.c bfin-parse.tab.h $(srcdir)/config/bfin-defs.h +bfin-lex.o: bfin-lex.c bfin-parse.h $(srcdir)/config/bfin-defs.h $(COMPILE) -c $< $(NO_WERROR) # The instruction table specification lexical analyzer and parser. diff --git a/gas/Makefile.in b/gas/Makefile.in index d563dd9197f..368fc47b1a2 100644 --- a/gas/Makefile.in +++ b/gas/Makefile.in @@ -661,7 +661,7 @@ POTFILES = $(MULTI_CFILES) $(TARGET_ENV_HFILES) $(OBJ_FORMAT_HFILES) \ noinst_SCRIPTS = $(GDBINIT) EXTRA_SCRIPTS = .gdbinit EXTRA_DIST = m68k-parse.c itbl-parse.c itbl-parse.h itbl-lex.c \ - bfin-parse.c + bfin-parse.c bfin-parse.h bfin-lex.c DISTCLEANFILES = targ-cpu.h obj-format.h targ-env.h itbl-cpu.h cgen-desc.h @@ -3135,15 +3135,15 @@ m68k-parse.h: ; @true $(srcdir)/config/m68k-parse.h: ; @true bfin-parse.c bfin-parse.tab.h: $(srcdir)/config/bfin-parse.y - $(SHELL) $(YLWRAP) $(srcdir)/config/bfin-parse.y y.tab.c bfin-parse.c y.tab.h bfin-parse.tab.h -- $(YACCCOMPILE) -d ; -bfin-parse.o: bfin-parse.c bfin-parse.tab.h $(srcdir)/config/bfin-defs.h + $(SHELL) $(YLWRAP) $(srcdir)/config/bfin-parse.y y.tab.c bfin-parse.c y.tab.h bfin-parse.h -- $(YACCCOMPILE) -d ; +bfin-parse.o: bfin-parse.c bfin-parse.h $(srcdir)/config/bfin-defs.h bfin-defs.h: ; @true $(srcdir)/config/bfin-defs.h: ; @true bfin-lex.c: $(srcdir)/config/bfin-lex.l $(SHELL) $(YLWRAP) $(srcdir)/config/bfin-lex.l lex.yy.c bfin-lex.c -- $(LEXCOMPILE) -bfin-lex.o: bfin-lex.c bfin-parse.tab.h $(srcdir)/config/bfin-defs.h +bfin-lex.o: bfin-lex.c bfin-parse.h $(srcdir)/config/bfin-defs.h $(COMPILE) -c $< $(NO_WERROR) # The instruction table specification lexical analyzer and parser. diff --git a/gas/config/bfin-lex.l b/gas/config/bfin-lex.l index df650350a2f..c3af8420265 100644 --- a/gas/config/bfin-lex.l +++ b/gas/config/bfin-lex.l @@ -23,7 +23,7 @@ #include #include #include "bfin-defs.h" -#include "bfin-parse.tab.h" +#include "bfin-parse.h" #include "as.h" static long parse_int (char **end); diff --git a/gas/config/tc-bfin.c b/gas/config/tc-bfin.c index f013df477fb..a1b3971d6fd 100644 --- a/gas/config/tc-bfin.c +++ b/gas/config/tc-bfin.c @@ -36,7 +36,7 @@ extern YY_BUFFER_STATE yy_scan_string (const char *yy_str); extern void yy_delete_buffer (YY_BUFFER_STATE b); static parse_state parse (char *line); static void bfin_s_bss PARAMS ((int)); -static int md_chars_to_number PARAMS ((unsigned char *, int)); +static int md_chars_to_number PARAMS ((char *, int)); /* Global variables. */ struct bfin_insn *insn; @@ -453,9 +453,7 @@ md_estimate_size_before_relax (fragS * fragP ATTRIBUTE_UNUSED, /* Convert from target byte order to host byte order. */ static int -md_chars_to_number (val, n) - unsigned char *val; /* Value in target byte order. */ - int n; /* Number of bytes in the input. */ +md_chars_to_number (char *val, int n) { int retval; -- 2.30.2