diff --git a/gas/ChangeLog b/gas/ChangeLog index 21450c268f..9b6d066bb2 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,12 @@ +2016-03-31 Trevor Saunders + + * config/tc-i960.c (parse_expr): Cast to char * when assigning to + input_line_pointer. + * config/tc-m32r.c (expand_debug_syms): Likewise. + * config/tc-msp430.c (msp430_dstoperand): Likewise. + * config/tc-z80.c (md_begin): Likewise. + * stabs.c (stabs_generate_asm_func): Likewise. + 2016-03-31 Trevor Saunders * cgen.c: Modernize the way functions declare arguments. diff --git a/gas/config/tc-i960.c b/gas/config/tc-i960.c index 8a8f31cd62..45e8a44e58 100644 --- a/gas/config/tc-i960.c +++ b/gas/config/tc-i960.c @@ -450,7 +450,7 @@ static int br_cnt; /* Name of the table of pointers to branches. A local (i.e., non-external) symbol. */ -static void ctrl_fmt (char *, long, int); +static void ctrl_fmt (const char *, long, int); void @@ -495,7 +495,7 @@ md_begin (void) string is not consumed in the evaluation -- tolerate no dangling junk! */ static void -parse_expr (char *textP, /* Text of expression to be parsed. */ +parse_expr (const char *textP, /* Text of expression to be parsed. */ expressionS *expP) /* Where to put the results of parsing. */ { char *save_in; /* Save global here. */ @@ -513,7 +513,7 @@ parse_expr (char *textP, /* Text of expression to be parsed. */ else { save_in = input_line_pointer; /* Save global. */ - input_line_pointer = textP; /* Make parser work for us. */ + input_line_pointer = (char *) textP; /* Make parser work for us. */ (void) expression (expP); if ((size_t) (input_line_pointer - textP) != strlen (textP)) @@ -558,7 +558,7 @@ emit (long instr) /* Word to be output, host byte order. */ address displacement is greater than 13 bits. */ static void -get_cdisp (char *dispP, /* Displacement as specified in source instruction. */ +get_cdisp (const char *dispP, /* Displacement as specified in source instruction. */ const char *ifmtP, /* "COBR" or "CTRL" (for use in error message). */ long instr, /* Instruction needing the displacement. */ int numbits, /* # bits of displacement (13 for COBR, 24 for CTRL). */ @@ -1494,7 +1494,7 @@ brlab_next (void) } static void -ctrl_fmt (char *targP, /* Pointer to text of lone operand (if any). */ +ctrl_fmt (const char *targP, /* Pointer to text of lone operand (if any). */ long opcode, /* Template of instruction. */ int num_ops) /* Number of operands. */ { diff --git a/gas/config/tc-m32r.c b/gas/config/tc-m32r.c index 76218324bd..89205f8142 100644 --- a/gas/config/tc-m32r.c +++ b/gas/config/tc-m32r.c @@ -613,7 +613,7 @@ expand_debug_syms (sym_linkS *syms, int align) { symbolS *symbolP = syms->symbol; next_syms = syms->next; - input_line_pointer = ".\n"; + input_line_pointer = (char *) ".\n"; pseudo_set (symbolP); free ((char *) syms); } diff --git a/gas/config/tc-msp430.c b/gas/config/tc-msp430.c index ae28984dc7..98910aa515 100644 --- a/gas/config/tc-msp430.c +++ b/gas/config/tc-msp430.c @@ -2156,7 +2156,7 @@ msp430_dstoperand (struct msp430_operand_s * op, if (op->am == 2) { - char *__tl = "0"; + char *__tl = (char *) "0"; op->mode = OP_EXP; op->am = 1; diff --git a/gas/config/tc-z80.c b/gas/config/tc-z80.c index 2f52814872..2e1dca987a 100644 --- a/gas/config/tc-z80.c +++ b/gas/config/tc-z80.c @@ -249,7 +249,7 @@ md_begin (void) } } p = input_line_pointer; - input_line_pointer = "0"; + input_line_pointer = (char *) "0"; nul.X_md=0; expression (& nul); input_line_pointer = p; diff --git a/gas/stabs.c b/gas/stabs.c index 876ffa541f..08b8439315 100644 --- a/gas/stabs.c +++ b/gas/stabs.c @@ -662,7 +662,7 @@ stabs_generate_asm_func (const char *funcname, const char *startlabname) if (! void_emitted_p) { - input_line_pointer = "\"void:t1=1\",128,0,0,0"; + input_line_pointer = (char *) "\"void:t1=1\",128,0,0,0"; s_stab ('s'); void_emitted_p = 1; }