From patchwork Mon Aug 18 17:08:01 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Evans X-Patchwork-Id: 2419 Received: (qmail 905 invoked by alias); 18 Aug 2014 17:08:19 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 882 invoked by uid 89); 18 Aug 2014 17:08:18 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.2 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-pa0-f73.google.com Received: from mail-pa0-f73.google.com (HELO mail-pa0-f73.google.com) (209.85.220.73) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Mon, 18 Aug 2014 17:08:11 +0000 Received: by mail-pa0-f73.google.com with SMTP id kx10so1385906pab.0 for ; Mon, 18 Aug 2014 10:08:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:message-id:from:to:subject; bh=3Iu/PSWy6IRrHTgnOF2AEuIMoUlPFDlmZ7gCfdLZo30=; b=FqTZFRPtU8oXQaXIDXtAIrxtQnX0z4TzQN2DlWBdu22XW04tu6USbDoJ5lmILSAkyG zggYUXqobAvxXhiyJoVEf54Eyc6Kujy6tQZUSRADkoc/60SUPB9MjXLeRNls7SvDwNkc 8NpwBq4tShGLMEbzUDhQIoMfEaV4INqqPupAoe8//uN9AJWd9lw+YA5aKdQa0CWXhkf+ IcNqZGPwmd6JI9H5R+3dMfqI4RCsaLBeKM5HDYDxfoOlS/ieY52Xbl/jq1yti85FQgdh qPScg3YrXWwsL5oCfQE4QitHpnUT3vW5DiCl3LPX8PS/cGnw5GOGSX2SOo0MsIEgdkT0 IKSQ== X-Gm-Message-State: ALoCoQmosq26eH0YJt9uhkck/dNjbIEcDXOtN/BzJH9+x40vxyM3BO1te3ss6ctsV30sq18Ai+lK X-Received: by 10.66.228.70 with SMTP id sg6mr17373525pac.2.1408381683253; Mon, 18 Aug 2014 10:08:03 -0700 (PDT) Received: from corp2gmr1-1.hot.corp.google.com (corp2gmr1-1.hot.corp.google.com [172.24.189.92]) by gmr-mx.google.com with ESMTPS id o69si68706yhp.6.2014.08.18.10.08.03 for (version=TLSv1.1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 18 Aug 2014 10:08:03 -0700 (PDT) Received: from ruffy2.mtv.corp.google.com (ruffy2.mtv.corp.google.com [172.17.128.107]) by corp2gmr1-1.hot.corp.google.com (Postfix) with ESMTP id 8CF7B31C59A; Mon, 18 Aug 2014 10:08:02 -0700 (PDT) Date: Mon, 18 Aug 2014 10:08:01 -0700 Message-Id: From: Doug Evans To: gdb-patches@sourceware.org, brobecker@adacore.com Subject: [commit] ada-typeprint.c (print_range): Initialize lo, hi for gcc -Wall. X-IsSubscribed: yes Hi. Just the standard tweak to cope with gcc -Wall. ../../clang/gdb/ada-typeprint.c: In function 'print_range': ../../clang/gdb/ada-typeprint.c:187:23: error: 'hi' may be used uninitialized in this function [-Werror=maybe-uninitialized] ada_print_scalar (target_type, hi, stream); ^ ../../clang/gdb/ada-typeprint.c:185:23: error: 'lo' may be used uninitialized in this function [-Werror=maybe-uninitialized] ada_print_scalar (target_type, lo, stream); ^ cc1: all warnings being treated as errors 2014-08-18 Doug Evans * ada-typeprint.c (print_range): Initialize lo,hi for gcc -Wall. diff --git a/gdb/ada-typeprint.c b/gdb/ada-typeprint.c index 57c8d93..27bd1d1 100644 --- a/gdb/ada-typeprint.c +++ b/gdb/ada-typeprint.c @@ -160,7 +160,7 @@ print_range (struct type *type, struct ui_file *stream, { struct type *target_type; volatile struct gdb_exception e; - LONGEST lo, hi; + LONGEST lo = 0, hi = 0; /* init for gcc -Wall */ target_type = TYPE_TARGET_TYPE (type); if (target_type == NULL)