Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Mike Frysinger via Gdb-patches <gdb-patches@sourceware.org>
To: Orgad Shaneh <orgads@gmail.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] sim/erc32: fix signedness compatiblity and redefinition warnings
Date: Fri, 29 Oct 2021 01:31:18 -0400	[thread overview]
Message-ID: <YXuHJryFsOjnBPDd@vapier> (raw)
In-Reply-To: <20211028075540.174496-1-orgads@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 797 bytes --]

On 28 Oct 2021 07:55, Orgad Shaneh via Gdb-patches wrote:

most of the patch looks fine enough

> @@ -1587,7 +1586,7 @@ memory_read(int32 asi, uint32 addr, uint32 *data, int32 sz, int32 *ws)
>  	*ws = mem_ramr_ws;
>  	return 0;
>      } else if ((addr >= MEC_START) && (addr < MEC_END)) {
> -	mexc = mec_read(addr, asi, data);
> +	mexc = mec_read(addr, asi, (uint32 *)data);

data is a void pointer, so you shouldn't need this cast in C

> @@ -1607,7 +1606,7 @@ memory_read(int32 asi, uint32 addr, uint32 *data, int32 sz, int32 *ws)
>  	} else if ((addr >= 0x10000000) && 
>  		   (addr < (0x10000000 + (512 << (mec_iocr & 0x0f)))) &&
>  		   (mec_iocr & 0x10))  {
> -	    *data = erareg;
> +	    *(uint32 *)data = erareg;

probably would be better to use memcpy on it
-mike

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2021-10-29  5:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-27  6:27 Orgad Shaneh via Gdb-patches
2021-10-27  9:37 ` Mike Frysinger via Gdb-patches
2021-10-28  7:55 ` Orgad Shaneh via Gdb-patches
2021-10-29  5:31   ` Mike Frysinger via Gdb-patches [this message]
2021-10-29  6:42 Orgad Shaneh via Gdb-patches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YXuHJryFsOjnBPDd@vapier \
    --to=gdb-patches@sourceware.org \
    --cc=orgads@gmail.com \
    --cc=vapier@gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox