From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 111120 invoked by alias); 11 Oct 2015 04:37:33 -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 111007 invoked by uid 89); 11 Oct 2015 04:37:24 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.8 required=5.0 tests=AWL,BAYES_00,SPF_SOFTFAIL autolearn=no version=3.3.2 X-HELO: smtp.electronicbox.net Received: from smtp.electronicbox.net (HELO smtp.electronicbox.net) (96.127.255.83) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 11 Oct 2015 04:37:21 +0000 Received: from simark.lan. (cable-192.222.137.139.electronicbox.net [192.222.137.139]) by smtp.electronicbox.net (Postfix) with ESMTP id A7A59440E78; Sun, 11 Oct 2015 00:37:19 -0400 (EDT) From: Simon Marchi To: gdb-patches@sourceware.org Cc: Simon Marchi Subject: [PATCH c++ 1/5] lm32: Add (const gdb_byte *) cast Date: Sun, 11 Oct 2015 04:37:00 -0000 Message-Id: <1444538238-7468-1-git-send-email-simon.marchi@polymtl.ca> X-SW-Source: 2015-10/txt/msg00128.txt.bz2 There might be a cleaner sequence of function calls to do what is done here (I don't know), but since I don't want to risk breaking anything, it's safer to just add the required cast. gdb/ChangeLog: * lm32-tdep.c (lm32_push_dummy_call): Add cast. --- gdb/lm32-tdep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/lm32-tdep.c b/gdb/lm32-tdep.c index 25a7e1e..a0defad 100644 --- a/gdb/lm32-tdep.c +++ b/gdb/lm32-tdep.c @@ -289,7 +289,7 @@ lm32_push_dummy_call (struct gdbarch *gdbarch, struct value *function, regcache_cooked_write_unsigned (regcache, first_arg_reg + i, val); else { - write_memory (sp, (void *) &val, TYPE_LENGTH (arg_type)); + write_memory (sp, (const gdb_byte *) &val, TYPE_LENGTH (arg_type)); sp -= 4; } } -- 2.6.1