From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6848 invoked by alias); 24 Oct 2016 10:04:59 -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 6734 invoked by uid 89); 24 Oct 2016 10:04:58 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no version=3.3.2 spammy= X-HELO: mail-pf0-f193.google.com Received: from mail-pf0-f193.google.com (HELO mail-pf0-f193.google.com) (209.85.192.193) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 24 Oct 2016 10:04:48 +0000 Received: by mail-pf0-f193.google.com with SMTP id i85so16189601pfa.0 for ; Mon, 24 Oct 2016 03:04:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id; bh=cagxUpQruoTpoMTSn1+Do/fAHh3CKMs/gAaRYpUGZ7A=; b=LKT/4I4d5geXFPh8UHIS7GTiaUWjVpiwYQwCE0OcMweF2xmga1FJpxvQWPaa0X2TVf y6uSIc89Z0/mzRVE4J4Q7tIASRlzQ4r0aEiGn7lBkFowVfH5IR8xLdMRZpuhcB0lGi7+ 2Q8jLsXGRDkRc6AFAnpnK7nPV2QE5PxVSuiqYsAY2Bx2CDPxa8g4Eh+MCmB5JzHly7UA xJTIi6LCCEeE6lnr0Kepqzi2oOKZaeZE7d5WMGkYKRfMd9sqshP/GSlJfTR4PP3Zh6Yn 9x586PiHZbuoeiO4rtlcbO6TR1L8P9nPwpwrMMBhxlcXw54YrQCHg6KxnhX0olve+/qg Pgeg== X-Gm-Message-State: ABUngvcymvQDDaRcPJuwFHtK/K+slAzwWJRXhjAhaRVh8S6mOzeossd81sKNaXZOSGwIQQ== X-Received: by 10.99.135.200 with SMTP id i191mr5707275pge.18.1477303485454; Mon, 24 Oct 2016 03:04:45 -0700 (PDT) Received: from E107787-LIN.cambridge.arm.com (gcc115.osuosl.org. [140.211.9.73]) by smtp.gmail.com with ESMTPSA id y125sm23993527pfb.16.2016.10.24.03.04.44 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 24 Oct 2016 03:04:45 -0700 (PDT) From: Yao Qi X-Google-Original-From: Yao Qi To: gdb-patches@sourceware.org Subject: [PATCH master+7.12] [GDBserver] Fix conversion warning Date: Mon, 24 Oct 2016 10:04:00 -0000 Message-Id: <1477303478-16463-1-git-send-email-yao.qi@linaro.org> X-IsSubscribed: yes X-SW-Source: 2016-10/txt/msg00657.txt.bz2 I got the following warning if I build GDBserver for aarch64_be-linux-gnu, git/gdb/gdbserver/linux-aarch64-low.c:1539:39: error: invalid conversion from 'void*' to 'uint32_t* {aka unsigned int*}' [-fpermissive] uint32_t *le_buf = xmalloc (byte_len); ^ The patch is to fix the warning. It is obvious, and I'll push it to master and 7.12 branch. gdb/gdbserver: 2016-10-24 Yao Qi PR server/20733 * linux-aarch64-low.c (append_insns): Cast the return value to 'uint32_t *'. --- gdb/gdbserver/linux-aarch64-low.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/gdbserver/linux-aarch64-low.c b/gdb/gdbserver/linux-aarch64-low.c index e54a8ba..ae80cdd 100644 --- a/gdb/gdbserver/linux-aarch64-low.c +++ b/gdb/gdbserver/linux-aarch64-low.c @@ -1536,7 +1536,7 @@ append_insns (CORE_ADDR *to, size_t len, const uint32_t *buf) { size_t byte_len = len * sizeof (uint32_t); #if (__BYTE_ORDER == __BIG_ENDIAN) - uint32_t *le_buf = xmalloc (byte_len); + uint32_t *le_buf = (uint32_t *) xmalloc (byte_len); size_t i; for (i = 0; i < len; i++) -- 1.9.1