diff options
author | Kaveh R. Ghazi <ghazi@caip.rutgers.edu> | 1998-10-12 17:54:46 +0000 |
---|---|---|
committer | Kaveh Ghazi <ghazi@gcc.gnu.org> | 1998-10-12 17:54:46 +0000 |
commit | 0816ebdd9b37e9d5c079cab5d527551ea925bc94 (patch) | |
tree | 140423aa4a8b4bfa9fb530284e7b241e8c752542 /gcc/f | |
parent | f77d8413595228c00d29d96c1631e2f12ea6360b (diff) | |
download | gcc-0816ebdd9b37e9d5c079cab5d527551ea925bc94.zip gcc-0816ebdd9b37e9d5c079cab5d527551ea925bc94.tar.gz gcc-0816ebdd9b37e9d5c079cab5d527551ea925bc94.tar.bz2 |
Warning fixes:
* bad.c (ffebad_finish): Change type of variable `c' to unsigned
char, change type of variable `s' to unsigned char *.
* com.c (ffecom_symbol_null_): Add missing initializers.
* fini.c (MAXNAMELEN): Undef it before defining.
* implic.c (ffeimplic_lookup_): Change type of parameter `c' to
unsigned char.
* intrin.c (ffeintrin_init_0): Cast the argument of ctype macros
to (unsigned char).
* lex.c (ffelex_splice_tokens): Change type of variable `p' to
unsigned char *.
(ffelex_token_name_from_names): Cast the argument of
`ffelex_is_firstnamechar' to (unsigned char).
(ffelex_token_names_from_names): Likewise.
(ffelex_token_new_name): Likewise.
(ffelex_token_new_names): Likewise.
* malloc.c (malloc_root_): Add missing initializer.
* stb.c (ffestb_do): Change type of variable `p' to unsigned char *.
(ffestb_else) Likewise.
(ffestb_else3_) Likewise.
(ffestb_endxyz) Likewise.
(ffestb_goto) Likewise.
(ffestb_let) Likewise.
(ffestb_varlist) Likewise.
(ffestb_R522) Likewise.
(ffestb_R528) Likewise.
(ffestb_R834) Likewise.
(ffestb_R835) Likewise.
(ffestb_R838) Likewise.
(ffestb_R1102) Likewise.
(ffestb_blockdata) Likewise.
(ffestb_R1212) Likewise.
(ffestb_R810) Likewise.
(ffestb_R10014_): Cast the argument of `ffelex_is_firstnamechar'
to (unsigned char).
(ffestb_V014): Change type of variable `p' to unsigned char *.
(ffestb_dummy) Likewise.
(ffestb_R524) Likewise.
(ffestb_R547) Likewise.
(ffestb_decl_chartype) Likewise.
(ffestb_decl_dbltype) Likewise.
(ffestb_decl_gentype) Likewise.
(ffestb_decl_entsp_2_) Likewise.
(ffestb_V027) Likewise.
(ffestb_decl_R539) Likewise.
* top.c (ffe_decode_option): Mark parameter `argc' with
ATTRIBUTE_UNUSED.
* where.c (ffewhere_unknown_line_): Add missing initializers.
From-SVN: r23030
Diffstat (limited to 'gcc/f')
-rw-r--r-- | gcc/f/ChangeLog | 59 | ||||
-rw-r--r-- | gcc/f/bad.c | 4 | ||||
-rw-r--r-- | gcc/f/com.c | 2 | ||||
-rw-r--r-- | gcc/f/fini.c | 1 | ||||
-rw-r--r-- | gcc/f/implic.c | 4 | ||||
-rw-r--r-- | gcc/f/intrin.c | 5 | ||||
-rw-r--r-- | gcc/f/lex.c | 10 | ||||
-rw-r--r-- | gcc/f/malloc.c | 2 | ||||
-rw-r--r-- | gcc/f/stb.c | 55 | ||||
-rw-r--r-- | gcc/f/top.c | 2 | ||||
-rw-r--r-- | gcc/f/where.c | 2 |
11 files changed, 106 insertions, 40 deletions
diff --git a/gcc/f/ChangeLog b/gcc/f/ChangeLog index 1806bbb..314439c 100644 --- a/gcc/f/ChangeLog +++ b/gcc/f/ChangeLog @@ -1,3 +1,62 @@ +Mon Oct 12 20:41:59 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> + + * bad.c (ffebad_finish): Change type of variable `c' to unsigned + char, change type of variable `s' to unsigned char *. + + * com.c (ffecom_symbol_null_): Add missing initializers. + + * fini.c (MAXNAMELEN): Undef it before defining. + + * implic.c (ffeimplic_lookup_): Change type of parameter `c' to + unsigned char. + + * intrin.c (ffeintrin_init_0): Cast the argument of ctype macros + to (unsigned char). + + * lex.c (ffelex_splice_tokens): Change type of variable `p' to + unsigned char *. + (ffelex_token_name_from_names): Cast the argument of + `ffelex_is_firstnamechar' to (unsigned char). + (ffelex_token_names_from_names): Likewise. + (ffelex_token_new_name): Likewise. + (ffelex_token_new_names): Likewise. + + * malloc.c (malloc_root_): Add missing initializer. + + * stb.c (ffestb_do): Change type of variable `p' to unsigned char *. + (ffestb_else) Likewise. + (ffestb_else3_) Likewise. + (ffestb_endxyz) Likewise. + (ffestb_goto) Likewise. + (ffestb_let) Likewise. + (ffestb_varlist) Likewise. + (ffestb_R522) Likewise. + (ffestb_R528) Likewise. + (ffestb_R834) Likewise. + (ffestb_R835) Likewise. + (ffestb_R838) Likewise. + (ffestb_R1102) Likewise. + (ffestb_blockdata) Likewise. + (ffestb_R1212) Likewise. + (ffestb_R810) Likewise. + (ffestb_R10014_): Cast the argument of `ffelex_is_firstnamechar' + to (unsigned char). + (ffestb_V014): Change type of variable `p' to unsigned char *. + (ffestb_dummy) Likewise. + (ffestb_R524) Likewise. + (ffestb_R547) Likewise. + (ffestb_decl_chartype) Likewise. + (ffestb_decl_dbltype) Likewise. + (ffestb_decl_gentype) Likewise. + (ffestb_decl_entsp_2_) Likewise. + (ffestb_V027) Likewise. + (ffestb_decl_R539) Likewise. + + * top.c (ffe_decode_option): Mark parameter `argc' with + ATTRIBUTE_UNUSED. + + * where.c (ffewhere_unknown_line_): Add missing initializers. + 1998-10-02 Dave Love <d.love@dl.ac.uk> * com.c (ffecom_expr_intrinsic_): Fix return type for RAND. diff --git a/gcc/f/bad.c b/gcc/f/bad.c index a2a4832..8387c4a 100644 --- a/gcc/f/bad.c +++ b/gcc/f/bad.c @@ -372,8 +372,8 @@ ffebad_finish () ffebadIndex bi; unsigned short i; char pointer; - char c; - char *s; + unsigned char c; + unsigned char *s; char *fn; static char buf[1024]; int bufi; diff --git a/gcc/f/com.c b/gcc/f/com.c index 9db1f84..c45c6b8 100644 --- a/gcc/f/com.c +++ b/gcc/f/com.c @@ -302,6 +302,8 @@ ffecomSymbol ffecom_symbol_null_ NULL_TREE, NULL_TREE, NULL_TREE, + NULL_TREE, + false }; ffeinfoKindtype ffecom_pointer_kind_ = FFEINFO_basictypeNONE; ffeinfoKindtype ffecom_label_kind_ = FFEINFO_basictypeNONE; diff --git a/gcc/f/fini.c b/gcc/f/fini.c index 3b98949..dc7cb24 100644 --- a/gcc/f/fini.c +++ b/gcc/f/fini.c @@ -24,6 +24,7 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include "proj.h" #include "malloc.h" +#undef MAXNAMELEN #define MAXNAMELEN 100 typedef struct _name_ *name; diff --git a/gcc/f/implic.c b/gcc/f/implic.c index bee8edf..b0271e8 100644 --- a/gcc/f/implic.c +++ b/gcc/f/implic.c @@ -73,7 +73,7 @@ static struct _ffeimplic_ ffeimplic_table_['z' - 'A' + 1]; /* Static functions (internal). */ -static ffeimplic_ ffeimplic_lookup_ (char c); +static ffeimplic_ ffeimplic_lookup_ (unsigned char c); /* Internal macros. */ @@ -89,7 +89,7 @@ static ffeimplic_ ffeimplic_lookup_ (char c); data type. */ static ffeimplic_ -ffeimplic_lookup_ (char c) +ffeimplic_lookup_ (unsigned char c) { /* NOTE: This is definitely ASCII-specific!! */ if (ISALPHA (c) || (c == '_')) diff --git a/gcc/f/intrin.c b/gcc/f/intrin.c index 6e27d21..dbfbdaf 100644 --- a/gcc/f/intrin.c +++ b/gcc/f/intrin.c @@ -1558,8 +1558,9 @@ ffeintrin_init_0 () break; if ((ISDIGIT (*p1) || (*p1 == '_')) && (*p1 == *p2) && (*p1 == *p3)) continue; - if (! ISUPPER (*p1) || ! ISLOWER (*p2) - || (*p1 != toupper (*p2)) || ((*p3 != *p1) && (*p3 != *p2))) + if (! ISUPPER ((unsigned char)*p1) || ! ISLOWER ((unsigned char)*p2) + || (*p1 != toupper ((unsigned char)*p2)) + || ((*p3 != *p1) && (*p3 != *p2))) break; } assert ((*p1 == *p2) && (*p1 == *p3) && (*p1 == '\0')); diff --git a/gcc/f/lex.c b/gcc/f/lex.c index c43aa7e..57b0e45 100644 --- a/gcc/f/lex.c +++ b/gcc/f/lex.c @@ -4347,7 +4347,7 @@ ffelexHandler ffelex_splice_tokens (ffelexHandler first, ffelexToken master, ffeTokenLength start) { - char *p; + unsigned char *p; ffeTokenLength i; ffelexToken t; @@ -4490,7 +4490,7 @@ ffelex_token_name_from_names (ffelexToken t, ffeTokenLength start, assert (len > 0); assert ((start + len) <= t->length); } - assert (ffelex_is_firstnamechar (t->text[start])); + assert (ffelex_is_firstnamechar ((unsigned char)(t->text[start]))); nt = ffelex_token_new_ (); nt->type = FFELEX_typeNAME; @@ -4525,7 +4525,7 @@ ffelex_token_names_from_names (ffelexToken t, ffeTokenLength start, assert (len > 0); assert ((start + len) <= t->length); } - assert (ffelex_is_firstnamechar (t->text[start])); + assert (ffelex_is_firstnamechar ((unsigned char)(t->text[start]))); nt = ffelex_token_new_ (); nt->type = FFELEX_typeNAMES; @@ -4585,7 +4585,7 @@ ffelex_token_new_name (char *s, ffewhereLine l, ffewhereColumn c) { ffelexToken t; - assert (ffelex_is_firstnamechar (*s)); + assert (ffelex_is_firstnamechar ((unsigned char)*s)); t = ffelex_token_new_ (); t->type = FFELEX_typeNAME; @@ -4606,7 +4606,7 @@ ffelex_token_new_names (char *s, ffewhereLine l, ffewhereColumn c) { ffelexToken t; - assert (ffelex_is_firstnamechar (*s)); + assert (ffelex_is_firstnamechar ((unsigned char)*s)); t = ffelex_token_new_ (); t->type = FFELEX_typeNAMES; diff --git a/gcc/f/malloc.c b/gcc/f/malloc.c index 4560211..905d49c 100644 --- a/gcc/f/malloc.c +++ b/gcc/f/malloc.c @@ -52,6 +52,8 @@ struct _malloc_root_ malloc_root_ 0, #if MALLOC_DEBUG 0, 0, 0, 0, 0, 0, 0, { '/' } +#else + { 0 } #endif }, }; diff --git a/gcc/f/stb.c b/gcc/f/stb.c index dc4bda4..c14ccf5 100644 --- a/gcc/f/stb.c +++ b/gcc/f/stb.c @@ -1859,7 +1859,7 @@ ffelexHandler ffestb_do (ffelexToken t) { ffeTokenLength i; - char *p; + unsigned char *p; ffelexHandler next; ffelexToken nt; ffestrSecond kw; @@ -2507,7 +2507,7 @@ ffelexHandler ffestb_else (ffelexToken t) { ffeTokenLength i; - char *p; + unsigned char *p; switch (ffelex_token_type (ffesta_tokens[0])) { @@ -2787,7 +2787,7 @@ static ffelexHandler ffestb_else3_ (ffelexToken t) { ffeTokenLength i; - char *p; + unsigned char *p; ffelex_set_names (FALSE); @@ -3013,7 +3013,7 @@ ffelexHandler ffestb_endxyz (ffelexToken t) { ffeTokenLength i; - char *p; + unsigned char *p; switch (ffelex_token_type (ffesta_tokens[0])) { @@ -3319,7 +3319,7 @@ ffelexHandler ffestb_goto (ffelexToken t) { ffeTokenLength i; - char *p; + unsigned char *p; ffelexHandler next; ffelexToken nt; @@ -4152,7 +4152,7 @@ ffestb_let (ffelexToken t) ffelexHandler next; bool vxtparam; /* TRUE if it might really be a VXT PARAMETER stmt. */ - char *p; + unsigned char *p; switch (ffelex_token_type (ffesta_tokens[0])) { @@ -4537,7 +4537,7 @@ ffelexHandler ffestb_varlist (ffelexToken t) { ffeTokenLength i; - char *p; + unsigned char *p; ffelexToken nt; ffelexHandler next; @@ -5284,7 +5284,7 @@ ffelexHandler ffestb_R522 (ffelexToken t) { ffeTokenLength i; - char *p; + unsigned char *p; ffelexToken nt; ffelexHandler next; @@ -5528,7 +5528,7 @@ ffestb_R5224_ (ffelexToken t) ffelexHandler ffestb_R528 (ffelexToken t) { - char *p; + unsigned char *p; ffeTokenLength i; ffelexToken nt; ffelexHandler next; @@ -6419,7 +6419,7 @@ ffelexHandler ffestb_R834 (ffelexToken t) { ffeTokenLength i; - char *p; + unsigned char *p; switch (ffelex_token_type (ffesta_tokens[0])) { @@ -6534,7 +6534,7 @@ ffelexHandler ffestb_R835 (ffelexToken t) { ffeTokenLength i; - char *p; + unsigned char *p; switch (ffelex_token_type (ffesta_tokens[0])) { @@ -6648,7 +6648,7 @@ ffestb_R8351_ (ffelexToken t) ffelexHandler ffestb_R838 (ffelexToken t) { - char *p; + unsigned char *p; ffeTokenLength i; ffelexHandler next; ffelexToken et; /* First token in target. */ @@ -7141,7 +7141,7 @@ ffelexHandler ffestb_R1102 (ffelexToken t) { ffeTokenLength i; - char *p; + unsigned char *p; switch (ffelex_token_type (ffesta_tokens[0])) { @@ -7293,7 +7293,7 @@ ffelexHandler ffestb_blockdata (ffelexToken t) { ffeTokenLength i; - char *p; + unsigned char *p; switch (ffelex_token_type (ffesta_tokens[0])) { @@ -7436,7 +7436,7 @@ ffelexHandler ffestb_R1212 (ffelexToken t) { ffeTokenLength i; - char *p; + unsigned char *p; ffelexHandler next; ffelexToken nt; @@ -8630,7 +8630,7 @@ ffelexHandler ffestb_R810 (ffelexToken t) { ffeTokenLength i; - char *p; + unsigned char *p; switch (ffelex_token_type (ffesta_tokens[0])) { @@ -9709,7 +9709,8 @@ ffestb_R10014_ (ffelexToken t) i += ffelex_token_length (ffestb_local_.format.post.t); if (*p == '\0') return (ffelexHandler) ffestb_R10016_; - if ((kw != FFESTR_formatP) || !ffelex_is_firstnamechar (*p)) + if ((kw != FFESTR_formatP) || + !ffelex_is_firstnamechar ((unsigned char)*p)) { if (ffestb_local_.format.current != FFESTP_formattypeH) ffesta_ffebad_1p (FFEBAD_FORMAT_TEXT_IN_NUMBER, t, i, NULL); @@ -12165,7 +12166,7 @@ ffelexHandler ffestb_V014 (ffelexToken t) { ffeTokenLength i; - char *p; + unsigned char *p; ffelexToken nt; ffelexHandler next; @@ -19399,7 +19400,7 @@ ffelexHandler ffestb_dummy (ffelexToken t) { ffeTokenLength i; - char *p; + unsigned char *p; switch (ffelex_token_type (ffesta_tokens[0])) { @@ -19618,7 +19619,7 @@ ffelexHandler ffestb_R524 (ffelexToken t) { ffeTokenLength i; - char *p; + unsigned char *p; ffelexToken nt; ffelexHandler next; @@ -19847,7 +19848,7 @@ ffelexHandler ffestb_R547 (ffelexToken t) { ffeTokenLength i; - char *p; + unsigned char *p; ffelexToken nt; ffelexHandler next; @@ -20485,7 +20486,7 @@ ffelexHandler ffestb_decl_chartype (ffelexToken t) { ffeTokenLength i; - char *p; + unsigned char *p; ffestb_local_.decl.type = FFESTP_typeCHARACTER; ffestb_local_.decl.recursive = NULL; @@ -20672,7 +20673,7 @@ ffelexHandler ffestb_decl_dbltype (ffelexToken t) { ffeTokenLength i; - char *p; + unsigned char *p; ffestb_local_.decl.type = ffestb_args.decl.type; ffestb_local_.decl.recursive = NULL; @@ -20863,7 +20864,7 @@ ffelexHandler ffestb_decl_gentype (ffelexToken t) { ffeTokenLength i; - char *p; + unsigned char *p; ffestb_local_.decl.type = ffestb_args.decl.type; ffestb_local_.decl.recursive = NULL; @@ -22667,7 +22668,7 @@ ffestb_decl_entsp_2_ (ffelexToken t) { ffelexToken nt; bool asterisk_ok; - char *p; + unsigned char *p; ffeTokenLength i; switch (ffelex_token_type (t)) @@ -24156,7 +24157,7 @@ ffestb_V0166_ (ffelexToken t) ffelexHandler ffestb_V027 (ffelexToken t) { - char *p; + unsigned char *p; ffeTokenLength i; switch (ffelex_token_type (ffesta_tokens[0])) @@ -24336,7 +24337,7 @@ ffelexHandler ffestb_decl_R539 (ffelexToken t) { ffeTokenLength i; - char *p; + unsigned char *p; ffelexToken nt; ffestrSecond kw; diff --git a/gcc/f/top.c b/gcc/f/top.c index 17e4139..fe5bc40 100644 --- a/gcc/f/top.c +++ b/gcc/f/top.c @@ -162,7 +162,7 @@ ffe_is_digit_string_ (char *s) int ffe_decode_option (argc, argv) - int argc; + int argc ATTRIBUTE_UNUSED; char **argv; { char *opt = argv[0]; diff --git a/gcc/f/where.c b/gcc/f/where.c index 89e0f85..b8b648c 100644 --- a/gcc/f/where.c +++ b/gcc/f/where.c @@ -38,7 +38,7 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA struct _ffewhere_line_ ffewhere_unknown_line_ = -{NULL, NULL, 0, 0, 0}; +{NULL, NULL, 0, 0, 0, {0}}; /* Simple definitions and enumerations. */ |