From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3577 invoked by alias); 29 Feb 2012 16:17:03 -0000 Received: (qmail 3551 invoked by uid 22791); 29 Feb 2012 16:17:01 -0000 X-SWARE-Spam-Status: No, hits=-6.7 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 29 Feb 2012 16:16:47 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q1TGGlqS005432 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 29 Feb 2012 11:16:47 -0500 Received: from hit-nxdomain.opendns.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q1TGGjvF027470 for ; Wed, 29 Feb 2012 11:16:46 -0500 Subject: [PATCH 01/14] -Wmissing-prototypes: Ada. To: gdb-patches@sourceware.org From: Pedro Alves Date: Wed, 29 Feb 2012 16:17:00 -0000 Message-ID: <20120229161645.23918.32258.stgit@hit-nxdomain.opendns.com> In-Reply-To: <20120229161628.23918.51354.stgit@hit-nxdomain.opendns.com> References: <20120229161628.23918.51354.stgit@hit-nxdomain.opendns.com> User-Agent: StGit/0.15 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-02/txt/msg00703.txt.bz2 $ make WERROR_CFLAGS="-Wmissing-prototypes" ada-lang.o ada-exp.o 1>/dev/null ../../src/gdb/ada-lang.c:10536:1: warning: no previous prototype for ‘ada_modulus_from_name’ [-Wmissing-prototypes] In file included from ../../src/gdb/ada-exp.y:765:0: ../../src/gdb/ada-lex.l:298:1: warning: no previous prototype for ‘lexer_init’ [-Wmissing-prototypes] ada_modulus_from_name was made orphan by: commit 345826d325cdf374077d253274477c5b56b45edc Author: Paul N. Hilfinger Date: Mon Dec 14 06:19:12 2009 +0000 ... * ada-lang.c (ada_modulus): Use new extended bound values. ... Okay to apply? 2012-02-29 Pedro Alves * ada-lang.c (ada_modulus_from_name): Delete. * ada-lex.l (lexer_init): Make static. --- gdb/ada-lang.c | 31 ------------------------------- gdb/ada-lex.l | 2 +- 2 files changed, 1 insertions(+), 32 deletions(-) diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index 107df93..84049eb 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -10528,37 +10528,6 @@ ada_is_modular_type (struct type *type) && TYPE_UNSIGNED (subranged_type)); } -/* Try to determine the lower and upper bounds of the given modular type - using the type name only. Return non-zero and set L and U as the lower - and upper bounds (respectively) if successful. */ - -int -ada_modulus_from_name (struct type *type, ULONGEST *modulus) -{ - const char *name = ada_type_name (type); - const char *suffix; - int k; - LONGEST U; - - if (name == NULL) - return 0; - - /* Discrete type bounds are encoded using an __XD suffix. In our case, - we are looking for static bounds, which means an __XDLU suffix. - Moreover, we know that the lower bound of modular types is always - zero, so the actual suffix should start with "__XDLU_0__", and - then be followed by the upper bound value. */ - suffix = strstr (name, "__XDLU_0__"); - if (suffix == NULL) - return 0; - k = 10; - if (!ada_scan_number (suffix, k, &U, NULL)) - return 0; - - *modulus = (ULONGEST) U + 1; - return 1; -} - /* Assuming ada_is_modular_type (TYPE), the modulus of TYPE. */ ULONGEST diff --git a/gdb/ada-lex.l b/gdb/ada-lex.l index 48667d0..784edbf 100644 --- a/gdb/ada-lex.l +++ b/gdb/ada-lex.l @@ -293,7 +293,7 @@ false { return FALSEKEYWORD; } /* Initialize the lexer for processing new expression. */ -void +static void lexer_init (FILE *inp) { BEGIN INITIAL;