From a938b1d6ba978dd1be27a6761a273be19acaf685 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Sat, 11 Sep 1993 00:15:39 +0000 Subject: [PATCH] More gcc lint with harsher warning options. --- gas/bignum-copy.c | 7 ++++--- gas/config/tc-a29k.c | 25 ++++++------------------- gas/xmalloc.c | 8 ++++---- 3 files changed, 14 insertions(+), 26 deletions(-) diff --git a/gas/bignum-copy.c b/gas/bignum-copy.c index af221aa6d1e..cb9f74afe9b 100644 --- a/gas/bignum-copy.c +++ b/gas/bignum-copy.c @@ -46,7 +46,7 @@ bignum_copy (in, in_length, out, out_length) littlenum. */ memcpy ((void *) out, (void *) in, - out_length << LITTLENUM_SHIFT); + (unsigned int) out_length << LITTLENUM_SHIFT); for (p = in + in_length - 1; p >= in; --p) { if (*p) @@ -62,12 +62,13 @@ bignum_copy (in, in_length, out, out_length) else { memcpy ((char *) out, (char *) in, - in_length << LITTLENUM_SHIFT); + (unsigned int) in_length << LITTLENUM_SHIFT); if (out_length > in_length) { memset ((char *) (out + in_length), - '\0', (out_length - in_length) << LITTLENUM_SHIFT); + '\0', + (unsigned int) (out_length - in_length) << LITTLENUM_SHIFT); } significant_littlenums_dropped = 0; diff --git a/gas/config/tc-a29k.c b/gas/config/tc-a29k.c index 537f7955c60..78e8d10e972 100644 --- a/gas/config/tc-a29k.c +++ b/gas/config/tc-a29k.c @@ -59,23 +59,10 @@ struct machine_it the_insn; -#if __STDC__ == 1 - -/* static int getExpression(char *str); */ -static void machine_ip (char *str); -/* static void print_insn(struct machine_it *insn); */ -static void s_data1 (void); -static void s_use (void); - -#else /* not __STDC__ */ - -/* static int getExpression(); */ -static void machine_ip (); -/* static void print_insn(); */ -static void s_data1 (); -static void s_use (); - -#endif /* not __STDC__ */ +static void machine_ip PARAMS ((char *str)); +/* static void print_insn PARAMS ((struct machine_it *insn)); */ +static void s_data1 PARAMS ((void)); +static void s_use PARAMS ((void)); const pseudo_typeS md_pseudo_table[] = @@ -152,13 +139,13 @@ s_use () if (strncmp (input_line_pointer, ".text", 5) == 0) { input_line_pointer += 5; - s_text (); + s_text (0); return; } if (strncmp (input_line_pointer, ".data", 5) == 0) { input_line_pointer += 5; - s_data (); + s_data (0); return; } if (strncmp (input_line_pointer, ".data1", 6) == 0) diff --git a/gas/xmalloc.c b/gas/xmalloc.c index 5a03d0dddc5..8b39ee5f04b 100644 --- a/gas/xmalloc.c +++ b/gas/xmalloc.c @@ -47,11 +47,11 @@ char * xmalloc (n) - long n; + unsigned long n; { char *retval; - retval = malloc ((unsigned) n); + retval = malloc (n); if (retval == NULL) error ("virtual memory exceeded"); return (retval); @@ -60,9 +60,9 @@ xmalloc (n) char * xrealloc (ptr, n) register char *ptr; - long n; + unsigned long n; { - ptr = realloc (ptr, (unsigned) n); + ptr = realloc (ptr, n); if (ptr == 0) error ("virtual memory exceeded"); return (ptr); -- 2.30.2