From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23475 invoked by alias); 11 Apr 2013 22:59:20 -0000 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 Received: (qmail 23450 invoked by uid 89); 11 Apr 2013 22:59:19 -0000 X-Spam-SWARE-Status: No, score=-8.9 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.1 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Thu, 11 Apr 2013 22:59:19 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r3BMxI20029432 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 11 Apr 2013 18:59:18 -0400 Received: from brno.lan (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r3BMxGAi016197 for ; Thu, 11 Apr 2013 18:59:17 -0400 Subject: [PATCH 03/26] cris-tdep.c: Use unsigned variable for unsigned command. To: gdb-patches@sourceware.org From: Pedro Alves Date: Thu, 11 Apr 2013 23:01:00 -0000 Message-ID: <20130411225916.16791.27453.stgit@brno.lan> In-Reply-To: <20130411225847.16791.29283.stgit@brno.lan> References: <20130411225847.16791.29283.stgit@brno.lan> User-Agent: StGit/0.16 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-SW-Source: 2013-04/txt/msg00343.txt.bz2 "set cris-version" is an unsigned command: /* CRIS-specific user-commands. */ add_setshow_uinteger_cmd ("cris-version", class_support, &usr_cmd_cris_version, _("Set the current CRIS version."), _("Show the current CRIS version."), _("\ Set to 10 for CRISv10 or 32 for CRISv32 if autodetection fails.\n\ Defaults to 10. "), Tested by building on x86_64 Fedora 17. --- gdb/cris-tdep.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gdb/cris-tdep.c b/gdb/cris-tdep.c index 2662513..03041e4 100644 --- a/gdb/cris-tdep.c +++ b/gdb/cris-tdep.c @@ -144,7 +144,7 @@ extern const struct cris_spec_reg cris_spec_regs[]; /* CRIS version, set via the user command 'set cris-version'. Affects register names and sizes. */ -static int usr_cmd_cris_version; +static unsigned int usr_cmd_cris_version; /* Indicates whether to trust the above variable. */ static int usr_cmd_cris_version_valid = 0; @@ -167,7 +167,7 @@ static int usr_cmd_cris_dwarf2_cfi = 1; /* CRIS architecture specific information. */ struct gdbarch_tdep { - int cris_version; + unsigned int cris_version; const char *cris_mode; int cris_dwarf2_cfi; }; @@ -1439,7 +1439,7 @@ cris_spec_reg_applicable (struct gdbarch *gdbarch, struct cris_spec_reg spec_reg) { struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); - int version = tdep->cris_version; + unsigned int version = tdep->cris_version; switch (spec_reg.applicable_version) { @@ -4013,7 +4013,7 @@ cris_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) { struct gdbarch *gdbarch; struct gdbarch_tdep *tdep; - int cris_version; + unsigned int cris_version; if (usr_cmd_cris_version_valid) {