diff options
author | Tobias Burnus <burnus@net-b.de> | 2010-08-23 14:39:20 +0200 |
---|---|---|
committer | Tobias Burnus <burnus@gcc.gnu.org> | 2010-08-23 14:39:20 +0200 |
commit | a4a7e2f5f71cc1e2a4aa4c4eb51fed83ff78fa08 (patch) | |
tree | 6abde470e0647713aef2eabae51c6979f94145ac /libgfortran | |
parent | 2fcac97d03014bb5fa558a08a65d9581390c98bf (diff) | |
download | gcc-a4a7e2f5f71cc1e2a4aa4c4eb51fed83ff78fa08.tar.gz |
re PR libfortran/45323 (warnings compiling libgfortran/io/write.c: array subscript has type 'char')
2010-08-23 Tobias Burnus <burnus@net-b.de>
PR fortran/45323
* io/write.c (nml_write_obj, namelist_write): Cast argument
of toupper to int.
From-SVN: r163469
Diffstat (limited to 'libgfortran')
-rw-r--r-- | libgfortran/ChangeLog | 6 | ||||
-rw-r--r-- | libgfortran/io/write.c | 6 |
2 files changed, 9 insertions, 3 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index eae41d236f6..c79027adcb7 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,9 @@ +2010-08-23 Tobias Burnus <burnus@net-b.de> + + PR fortran/45323 + * io/write.c (nml_write_obj, namelist_write): Cast argument + of toupper to int. + 2010-08-21 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> * configure: Regenerate. diff --git a/libgfortran/io/write.c b/libgfortran/io/write.c index 775425d6d77..e811c47baef 100644 --- a/libgfortran/io/write.c +++ b/libgfortran/io/write.c @@ -1703,14 +1703,14 @@ nml_write_obj (st_parameter_dt *dtp, namelist_info * obj, index_type offset, base_name_len = strlen (base_name); for (dim_i = 0; dim_i < base_name_len; dim_i++) { - cup = toupper (base_name[dim_i]); + cup = toupper ((int) base_name[dim_i]); write_character (dtp, &cup, 1, 1); } } clen = strlen (obj->var_name); for (dim_i = len; dim_i < clen; dim_i++) { - cup = toupper (obj->var_name[dim_i]); + cup = toupper ((int) obj->var_name[dim_i]); write_character (dtp, &cup, 1, 1); } write_character (dtp, "=", 1, 1); @@ -1959,7 +1959,7 @@ namelist_write (st_parameter_dt *dtp) /* Write namelist name in upper case - f95 std. */ for (i = 0 ;i < dtp->namelist_name_len ;i++ ) { - c = toupper (dtp->namelist_name[i]); + c = toupper ((int) dtp->namelist_name[i]); write_character (dtp, &c, 1 ,1); } |