aboutsummaryrefslogtreecommitdiff
path: root/gcc/f/bad.c
diff options
context:
space:
mode:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>1999-03-27 10:24:06 +0000
committerKaveh Ghazi <ghazi@gcc.gnu.org>1999-03-27 10:24:06 +0000
commit26f096f9e545b3f951ab850f06fad454613b0e43 (patch)
tree7e09ee2a6c2fe78d743d5fb05a2b79c2356f2880 /gcc/f/bad.c
parent90e734a8538d4d9c58275878171da5f6df2fcf45 (diff)
downloadgcc-26f096f9e545b3f951ab850f06fad454613b0e43.zip
gcc-26f096f9e545b3f951ab850f06fad454613b0e43.tar.gz
gcc-26f096f9e545b3f951ab850f06fad454613b0e43.tar.bz2
Warning fixes:
* bad.c (_ffebad_message_, ffebad_string_, ffebad_message_, ffebad_bufputs_, ffebad_bufputs_, ffebad_start_, ffebad_string, ffebad_finish): Const-ify a char*. * bld.c (ffebld_op_string_, ffebld_op_string): Likewise. * bld.h (ffebld_op_string): Likewise. * com.c (ffecom_arglist_expr_, ffecom_build_f2c_string_, ffecom_debug_kludge_, ffecom_f2c_make_type_, ffecom_get_appended_identifier_, ffecom_get_identifier_, ffecom_gfrt_args_): Likewise. (ffecom_convert_narrow_, ffecom_convert_widen_): Add prototype. (builtin_function, ffecom_gfrt_name_, ffecom_gfrt_argstring_, ffecom_arglist_expr_, ffecom_build_f2c_string_, ffecom_debug_kludge_, ffecom_f2c_make_type_, ffecom_get_appended_identifier_, ffecom_get_external_identifier_, ffecom_get_identifier_, ffecom_decl_field, ffecom_get_invented_identifier, lang_print_error_function, skip_redundant_dir_prefix, read_name_map, print_containing_files): Const-ify a char*. (savestring): Remove, use `xstrdup' instead. * com.h (ffecom_decl_field, ffecom_get_invented_identifier): Const-ify a char*. * data.c (ffebld, ffedata_gather_): Make explicitly static. * expr.c (ffeexpr_isdigits_, ffeexpr_percent_, ffeexpr_reduced_concatenate_, ffeexpr_nil_real_, ffeexpr_nil_number_, ffeexpr_nil_number_period_, ffeexpr_nil_number_real_, ffeexpr_token_real_, ffeexpr_token_number_, ffeexpr_token_number_period_, ffeexpr_token_number_real_): Const-ify a char*. * fini.c (xspaces): Likewise. * global.c (ffeglobal_type_string_): Likewise. (ffeglobal_drive): Protoize. (ffeglobal_proc_def_arg): Const-ify a char*. * global.h (ffeglobal_drive): Protoize. (ffeglobal_proc_def_arg): Const-ify a char*. * implic.c (ffeimplic_none, ffeimplic_peek_symbol_type): Likewise. * implic.h (ffeimplic_peek_symbol_type): Likewise. * info.c (ffeinfo_basictype_string_, ffeinfo_kind_message_, ffeinfo_kind_string_, ffeinfo_kindtype_string_, ffeinfo_where_string_, ffeinfo_basictype_string, ffeinfo_kind_message, ffeinfo_kind_string, ffeinfo_kindtype_string, ffeinfo_where_string): Likewise. * info.h (ffeinfo_basictype_string, ffeinfo_kind_message, ffeinfo_kind_string, ffeinfo_kindtype_string, ffeinfo_where_string): Likewise. * intrin.c (_ffeintrin_name_, _ffeintrin_gen_, _ffeintrin_spec_, _ffeintrin_imp_, ffeintrin_check_, ffeintrin_cmp_name_, ffeintrin_fulfill_specific, ffeintrin_init_0, ffeintrin_is_actualarg, ffeintrin_is_intrinsic, ffeintrin_name_generic, ffeintrin_name_implementation, ffeintrin_name_specific): Likewise. * intrin.h (ffeintrin_is_intrinsic, ffeintrin_name_generic, ffeintrin_name_implementation, ffeintrin_name_specific): Likewise. * lex.c (ffelex_type_string_, ffelex_token_new_character, ffelex_token_new_name, ffelex_token_new_names, ffelex_token_new_number): Likewise. * lex.h (ffelex_token_new_character, ffelex_token_new_name, ffelex_token_new_names, ffelex_token_new_number): Likewise. * malloc.c (malloc_types_, malloc_pool_new, malloc_new_inpool_, malloc_new_zinpool_): Likewise. * malloc.h (malloc_new_inpool_, malloc_new_zinpool_, malloc_pool_new): Likewise. * name.c (ffename_space_drive_global, ffename_space_drive_symbol): Protoize. * name.h (ffename_space_drive_global, ffename_space_drive_symbol): Likewise. * symbol.c (ffesymbol_state_name_, ffesymbol_attr_name_, ffesymbol_attrs_string): Const-ify a char*. (ffesymbol_drive, ffesymbol_drive_sfnames): Protoize. (ffesymbol_state_string): Const-ify a char*. * symbol.h (ffesymbol_attrs_string): Likewise. (ffesymbol_drive, ffesymbol_drive_sfnames): Protoize. (ffesymbol_state_string): Const-ify a char*. * target.c (ffetarget_layout): Likewise. * target.h (ffetarget_layout): Likewise. From-SVN: r26013
Diffstat (limited to 'gcc/f/bad.c')
-rw-r--r--gcc/f/bad.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/gcc/f/bad.c b/gcc/f/bad.c
index 63311d5..704fa12 100644
--- a/gcc/f/bad.c
+++ b/gcc/f/bad.c
@@ -62,7 +62,7 @@ bool ffebad_is_inhibited_ = FALSE;
struct _ffebad_message_
{
ffebadSeverity severity;
- char *message;
+ const char *message;
};
/* Static objects accessed by functions in this module. */
@@ -89,11 +89,11 @@ static struct
}
ffebad_here_[FFEBAD_MAX_];
-static char *ffebad_string_[FFEBAD_MAX_];
+static const char *ffebad_string_[FFEBAD_MAX_];
static ffebadIndex ffebad_order_[FFEBAD_MAX_];
static ffebad ffebad_errnum_;
static ffebadSeverity ffebad_severity_;
-static char *ffebad_message_;
+static const char *ffebad_message_;
static unsigned char ffebad_index_;
static ffebadIndex ffebad_places_;
static bool ffebad_is_temp_inhibited_; /* Effective setting of
@@ -102,7 +102,7 @@ static bool ffebad_is_temp_inhibited_; /* Effective setting of
/* Static functions (internal). */
-static int ffebad_bufputs_ (char buf[], int bufi, char *s);
+static int ffebad_bufputs_ (char buf[], int bufi, const char *s);
/* Internal macros. */
@@ -115,7 +115,7 @@ static int ffebad_bufputs_ (char buf[], int bufi, char *s);
static int
-ffebad_bufputs_ (char buf[], int bufi, char *s)
+ffebad_bufputs_ (char buf[], int bufi, const char *s)
{
for (; *s != '\0'; ++s)
bufi = ffebad_bufputc_ (buf, bufi, *s);
@@ -161,7 +161,7 @@ ffebad_severity (ffebad errnum)
bool
ffebad_start_ (bool lex_override, ffebad errnum, ffebadSeverity sev,
- char *message)
+ const char *message)
{
unsigned char i;
@@ -321,7 +321,7 @@ ffebad_here (ffebadIndex index, ffewhereLine line, ffewhereColumn col)
/* Establish string for next index (always in order) of message
- ffebad_string(char *string);
+ ffebad_string(const char *string);
Call ffebad_start to establish the message, ffebad_here and ffebad_string
to send run-time data to it as necessary, then ffebad_finish when through
@@ -330,7 +330,7 @@ ffebad_here (ffebadIndex index, ffewhereLine line, ffewhereColumn col)
the argument passed in until then. */
void
-ffebad_string (char *string)
+ffebad_string (const char *string)
{
if (ffebad_is_temp_inhibited_)
return;
@@ -351,7 +351,7 @@ void
ffebad_finish ()
{
#define MAX_SPACES 132
- static char *spaces
+ static const char *spaces
= "...>\
\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\
\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\
@@ -373,8 +373,8 @@ ffebad_finish ()
unsigned short i;
char pointer;
unsigned char c;
- unsigned char *s;
- char *fn;
+ unsigned const char *s;
+ const char *fn;
static char buf[1024];
int bufi;
int index;