Fix gcc -Wall warnings. See ChangeLog for details.
This commit is contained in:
parent
dfbb701a94
commit
c246596af7
3 changed files with 51 additions and 8 deletions
|
@ -1,3 +1,42 @@
|
|||
Sat Mar 28 22:28:02 1998 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
Fix some gcc -Wall warnings:
|
||||
* atof-generic.c (atof_generic): Add casts to avoid warnings.
|
||||
* ehopt.c (eh_frame_code_alignment): Likewise.
|
||||
* expr.c (integer_constant, operand): Likewise.
|
||||
* frags.c (frag_align): Likewise.
|
||||
* gasp.c (level_0, change_base, doinstr): Likewise.
|
||||
* hash.c (hash_ask): Likewise.
|
||||
* listing.c (listing_page, calc_hex, print_lines): Likewise.
|
||||
(debugging_pseudo): Likewise.
|
||||
* macro.c (define_macro, check_macro): Likewise.
|
||||
* read.c (read_a_source_file, s_align, s_float_space): Likewise.
|
||||
(ignore_rest_of_line, float_cons): Likewise.
|
||||
* symbols.c (decode_local_label_name): Likewise.
|
||||
* write.c (record_alignment, cvs_frag_to_fill): Likewise.
|
||||
(fixup_segment, number_to_chars_bigendian): Likewise.
|
||||
(number_to_chars_littleendian): Likewise.
|
||||
* config/atof-ieee.c (gen_to_words): Likewise.
|
||||
* config/tc-sparc.c (md_begin, md_assemble): Likewise.
|
||||
(sparc_ip, parse_keyword_arg, s_common): Likewise.
|
||||
* read.c (output_big_sleb128): Initialize locals to avoid
|
||||
warnings.
|
||||
(output_big_uleb128, equals): Likewise.
|
||||
* atof-generic.c (atof_generic): Change number_of_digits_* locals
|
||||
to unsigned int. Change zeros to unsigned int.
|
||||
* cond.c (s_if): Add return to default case.
|
||||
* frags.c (frag_now_fix): Change return type to addressT.
|
||||
* frags.h (frag_now_fix): Update declaration.
|
||||
* listing.c (file_info_struct): Change linenum to unsigned int.
|
||||
(struct list_info_struct): Change hll_line to unsigned int.
|
||||
(print_source): Update format string.
|
||||
* read.c (emit_expr): Change scan to unsigned int, and don't
|
||||
bother to initialize it.
|
||||
* symbols.c (dollar_label_count): Change to unsigned long.
|
||||
* write.c (adjust_reloc_syms): Remove unused label reduce_fixup.
|
||||
* config/tc-sparc.c (sparc_memory_model): Only define if OBJ_ELF.
|
||||
* config/tc-sparc.c (tc_gen_reloc): Add return to default case.
|
||||
|
||||
Fri Mar 27 12:46:47 1998 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* config/tc-m68k.c (m68k_ip): Check legal addressing modes for
|
||||
|
|
14
gas/expr.c
14
gas/expr.c
|
@ -1,5 +1,5 @@
|
|||
/* expr.c -operands, expressions-
|
||||
Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 1997, 1998
|
||||
Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 97, 1998
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GAS, the GNU Assembler.
|
||||
|
@ -302,7 +302,9 @@ integer_constant (radix, expressionP)
|
|||
/* In MRI mode, the number may have a suffix indicating the
|
||||
radix. For that matter, it might actually be a floating
|
||||
point constant. */
|
||||
for (suffix = input_line_pointer; isalnum (*suffix); suffix++)
|
||||
for (suffix = input_line_pointer;
|
||||
isalnum ((unsigned char) *suffix);
|
||||
suffix++)
|
||||
{
|
||||
if (*suffix == 'e' || *suffix == 'E')
|
||||
flt = 1;
|
||||
|
@ -316,7 +318,7 @@ integer_constant (radix, expressionP)
|
|||
else
|
||||
{
|
||||
c = *--suffix;
|
||||
if (islower (c))
|
||||
if (islower ((unsigned char) c))
|
||||
c = toupper (c);
|
||||
if (c == 'B')
|
||||
radix = 2;
|
||||
|
@ -818,7 +820,8 @@ operand (expressionP)
|
|||
{
|
||||
input_line_pointer++;
|
||||
floating_constant (expressionP);
|
||||
expressionP->X_add_number = -(isupper (c) ? tolower (c) : c);
|
||||
expressionP->X_add_number =
|
||||
- (isupper ((unsigned char) c) ? tolower (c) : c);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -933,7 +936,8 @@ operand (expressionP)
|
|||
case 'G':
|
||||
input_line_pointer++;
|
||||
floating_constant (expressionP);
|
||||
expressionP->X_add_number = -(isupper (c) ? tolower (c) : c);
|
||||
expressionP->X_add_number =
|
||||
- (isupper ((unsigned char) c) ? tolower (c) : c);
|
||||
break;
|
||||
|
||||
case '$':
|
||||
|
|
|
@ -607,7 +607,7 @@ level_0 (idx, string, lhs)
|
|||
|
||||
lhs->value = 0;
|
||||
|
||||
if (isdigit (string->ptr[idx]))
|
||||
if (isdigit ((unsigned char) string->ptr[idx]))
|
||||
{
|
||||
idx = sb_strtol (idx, string, 10, &lhs->value);
|
||||
}
|
||||
|
@ -1165,7 +1165,7 @@ change_base (idx, in, out)
|
|||
idx++;
|
||||
}
|
||||
}
|
||||
else if (isdigit (in->ptr[idx]))
|
||||
else if (isdigit ((unsigned char) in->ptr[idx]))
|
||||
{
|
||||
int value;
|
||||
/* all numbers must start with a digit, let's chew it and
|
||||
|
@ -1717,7 +1717,7 @@ doinstr (idx, in, out)
|
|||
idx = sb_skip_comma (idx, in);
|
||||
idx = get_and_process (idx, in, &search);
|
||||
idx = sb_skip_comma (idx, in);
|
||||
if (isdigit (in->ptr[idx]))
|
||||
if (isdigit ((unsigned char) in->ptr[idx]))
|
||||
{
|
||||
idx = exp_get_abs (".instr needs absolute expresson.\n", idx, in, &start);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue