From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12346 invoked by alias); 21 Oct 2013 15:37:51 -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 12294 invoked by uid 89); 21 Oct 2013 15:37:50 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_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 ESMTP; Mon, 21 Oct 2013 15:37:50 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r9LFblmL011783 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 21 Oct 2013 11:37:48 -0400 Received: from redhat.brq.redhat.com (unused-4-133.brq.redhat.com [10.34.4.133]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r9LFbRIx025201; Mon, 21 Oct 2013 11:37:47 -0400 From: Ondrej Oprala To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH 15/18] fix up vec Date: Mon, 21 Oct 2013 15:37:00 -0000 Message-Id: <1382369846-5817-16-git-send-email-ooprala@redhat.com> In-Reply-To: <1382369846-5817-1-git-send-email-ooprala@redhat.com> References: <1382369846-5817-1-git-send-email-ooprala@redhat.com> X-IsSubscribed: yes X-SW-Source: 2013-10/txt/msg00648.txt.bz2 From: Tom Tromey gdb/ChangeLog 2013-10-21 Tom Tromey * common/vec.c (vec_o_preserve): Add casts to struct vec_prefix *. * common/vec.h (vec_free_): Add a cast to VEC(T). (DEF_VEC_ALLOC_FUNC_I): Add a cast to VEC(T) where necessary in the definitions of VEC_OP. (DEF_VEC_ALLOC_FUNC_P): Likewise. (DEF_VEC_ALLOC_FUNC_O): Likewise. --- gdb/common/vec.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gdb/common/vec.h b/gdb/common/vec.h index 86564e7..8de353c 100644 --- a/gdb/common/vec.h +++ b/gdb/common/vec.h @@ -391,7 +391,7 @@ /* Reallocate an array of elements with prefix. */ extern void *vec_p_reserve (void *, int); extern void *vec_o_reserve (void *, int, size_t, size_t); -#define vec_free_(V) xfree (V) +#define vec_free_(V) xfree ((void *) (V)) #define VEC_ASSERT_INFO ,__FILE__,__LINE__ #define VEC_ASSERT_DECL ,const char *file_,unsigned line_ @@ -501,7 +501,7 @@ static inline void VEC_OP (T,free) \ static inline void VEC_OP (T,cleanup) \ (void *arg_) \ { \ - VEC(T) **vec_ = arg_; \ + VEC(T) **vec_ = (VEC(T) **) arg_; \ if (*vec_) \ vec_free_ (*vec_); \ *vec_ = NULL; \ @@ -748,7 +748,7 @@ static inline void VEC_OP (T,free) \ static inline void VEC_OP (T,cleanup) \ (void *arg_) \ { \ - VEC(T) **vec_ = arg_; \ + VEC(T) **vec_ = (VEC(T) **) arg_; \ if (*vec_) \ vec_free_ (*vec_); \ *vec_ = NULL; \ @@ -1058,7 +1058,7 @@ static inline void VEC_OP (T,free) \ static inline void VEC_OP (T,cleanup) \ (void *arg_) \ { \ - VEC(T) **vec_ = arg_; \ + VEC(T) **vec_ = (VEC(T) **) arg_; \ if (*vec_) \ vec_free_ (*vec_); \ *vec_ = NULL; \ -- 1.8.3.1