From patchwork Wed Oct 28 14:59:17 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pedro Alves X-Patchwork-Id: 9417 Received: (qmail 56375 invoked by alias); 28 Oct 2015 14:59:29 -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 56242 invoked by uid 89); 28 Oct 2015 14:59:28 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 28 Oct 2015 14:59:27 +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 (Postfix) with ESMTPS id 7BC0A96CA for ; Wed, 28 Oct 2015 14:59:26 +0000 (UTC) Received: from brno.lan (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t9SExMoW026712 for ; Wed, 28 Oct 2015 10:59:25 -0400 From: Pedro Alves To: gdb-patches@sourceware.org Subject: [PATCH 2/7] Add cast to exception_none Date: Wed, 28 Oct 2015 14:59:17 +0000 Message-Id: <1446044362-8655-3-git-send-email-palves@redhat.com> In-Reply-To: <1446044362-8655-1-git-send-email-palves@redhat.com> References: <1446044362-8655-1-git-send-email-palves@redhat.com> MIME-Version: 1.0 Fixes, in C++ mode: ../../src/gdb/common/common-exceptions.c:23:69: error: invalid conversion from ‘int’ to ‘return_reason’ [-fpermissive] const struct gdb_exception exception_none = { 0, GDB_NO_ERROR, NULL }; ^ (I considered adding an enum value for '0', but the code and comments around return_reason and its uses explain how 0 is special/internal, so I'm leaving it be.) gdb/ChangeLog: 2015-10-27 Pedro Alves * common/common-exceptions.c (exception_none): Add cast. --- gdb/common/common-exceptions.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/common/common-exceptions.c b/gdb/common/common-exceptions.c index 8ee96ab..ce476a2 100644 --- a/gdb/common/common-exceptions.c +++ b/gdb/common/common-exceptions.c @@ -20,7 +20,7 @@ #include "common-defs.h" #include "common-exceptions.h" -const struct gdb_exception exception_none = { 0, GDB_NO_ERROR, NULL }; +const struct gdb_exception exception_none = { (enum return_reason) 0, GDB_NO_ERROR, NULL }; #ifndef __cplusplus