From patchwork Tue Oct 27 13:30:00 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Marchi X-Patchwork-Id: 9398 Received: (qmail 121238 invoked by alias); 27 Oct 2015 13:30:08 -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 121073 invoked by uid 89); 27 Oct 2015 13:30:06 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-qg0-f52.google.com Received: from mail-qg0-f52.google.com (HELO mail-qg0-f52.google.com) (209.85.192.52) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Tue, 27 Oct 2015 13:30:05 +0000 Received: by qgem9 with SMTP id m9so144927574qge.1 for ; Tue, 27 Oct 2015 06:30:02 -0700 (PDT) X-Received: by 10.140.81.21 with SMTP id e21mr8168132qgd.69.1445952602843; Tue, 27 Oct 2015 06:30:02 -0700 (PDT) Received: from [10.0.0.136] (modemcable053.173-58-74.mc.videotron.ca. [74.58.173.53]) by smtp.gmail.com with ESMTPSA id p88sm15128525qkl.34.2015.10.27.06.30.01 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Oct 2015 06:30:02 -0700 (PDT) Subject: Re: [PATCH c++ 12/12] ada-lang.h: Add cast in GROW_VECT To: Pedro Alves References: <1445831362-18789-1-git-send-email-simon.marchi@polymtl.ca> <1445831362-18789-2-git-send-email-simon.marchi@polymtl.ca> <562E59DF.9040407@redhat.com> <562EE2CD.6050104@polymtl.ca> <562F6A5B.7020500@redhat.com> Cc: gdb-patches@sourceware.org From: Simon Marchi Message-ID: <562F7C58.8090504@polymtl.ca> Date: Tue, 27 Oct 2015 09:30:00 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <562F6A5B.7020500@redhat.com> On 27/10/15 08:13 AM, Pedro Alves wrote: > It's certainly fine with me. > > Thanks, > Pedro Alves Ok, pushed. From a480de357b17b1b2057b8375284079ccafae39db Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Tue, 27 Oct 2015 09:27:40 -0400 Subject: [PATCH] ada-lang.h: Add cast in GROW_VECT The assignment requires a cast in C++. We only use this macro for vectors of chars, so adding (char *) diretly will do for now. gdb/ChangeLog: * ada-lang.h (GROW_VECT): Add cast. --- gdb/ChangeLog | 4 ++++ gdb/ada-lang.h | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 27ea4f6..7b78890 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2015-10-27 Simon Marchi + + * ada-lang.h (GROW_VECT): Add cast. + 2015-10-26 Doug Evans * symtab.h (struct general_symbol_info> : Update comment. diff --git a/gdb/ada-lang.h b/gdb/ada-lang.h index 62896f1..7c527cc 100644 --- a/gdb/ada-lang.h +++ b/gdb/ada-lang.h @@ -147,7 +147,7 @@ struct ada_task_info least M objects, updating V and S as necessary. */ #define GROW_VECT(v, s, m) \ - if ((s) < (m)) (v) = grow_vect (v, &(s), m, sizeof *(v)); + if ((s) < (m)) (v) = (char *) grow_vect (v, &(s), m, sizeof *(v)); extern void *grow_vect (void *, size_t *, size_t, int);