From patchwork Mon Aug 23 12:40:06 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tobias Burnus X-Patchwork-Id: 62479 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id BCEDFB6EEF for ; Mon, 23 Aug 2010 22:40:31 +1000 (EST) Received: (qmail 13148 invoked by alias); 23 Aug 2010 12:40:28 -0000 Received: (qmail 13130 invoked by uid 22791); 23 Aug 2010 12:40:27 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from mx02.qsc.de (HELO mx02.qsc.de) (213.148.130.14) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 23 Aug 2010 12:40:12 +0000 Received: from [192.168.178.22] (port-92-204-8-164.dynamic.qsc.de [92.204.8.164]) by mx02.qsc.de (Postfix) with ESMTP id 291F31E67F; Mon, 23 Aug 2010 14:40:06 +0200 (CEST) Message-ID: <4C726C26.1040000@net-b.de> Date: Mon, 23 Aug 2010 14:40:06 +0200 From: Tobias Burnus User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.7) Gecko/20100714 SUSE/3.1.1 Thunderbird/3.1.1 MIME-Version: 1.0 To: gcc patches , gfortran Subject: [Patch, Fortran, committed] PR 45323 - cast argument of "touppper" to int Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org alphaev67-dec-osf5.1 showed warnings like: /home/jayk/src/gcc-4.5.1/libgfortran/io/write.c: In function 'nml_write_obj': /home/jayk/src/gcc-4.5.1/libgfortran/io/write.c:1504:8: warning: array subscript has type 'char' Committed as obvious to the trunk (Rev. 163469). I don't plan to fix it on the 4.5 branch - but feel free to backport it. Tobias Index: libgfortran/ChangeLog =================================================================== --- libgfortran/ChangeLog (revision 163468) +++ libgfortran/ChangeLog (working copy) @@ -1,3 +1,9 @@ +2010-08-23 Tobias Burnus + + PR fortran/45323 + * io/write.c (nml_write_obj, namelist_write): Cast argument + of toupper to int. + 2010-08-21 Ralf Wildenhues * configure: Regenerate. Index: libgfortran/io/write.c =================================================================== --- libgfortran/io/write.c (revision 163468) +++ libgfortran/io/write.c (working copy) @@ -1703,14 +1703,14 @@ nml_write_obj (st_parameter_dt *dtp, nam 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); }