From: Corinna Vinschen <vinschen@redhat.com>
To: newlib@sourceware.org
Subject: Re: [PATCH] libgloss: csky: fix pointer-to-integer warning
Date: Fri, 13 Jan 2023 11:12:58 +0100 [thread overview]
Message-ID: <Y8Euqj2R5nlTobPT@calimero.vinschen.de> (raw)
In-Reply-To: <20230113043757.8827-1-vapier@gentoo.org>
On Jan 12 23:37, Mike Frysinger wrote:
> parameters is an array of integers, so assigning NULL (a pointer)
> doesn't make sense. Use 0 instead which produces the same code.
> ---
> libgloss/csky/io-gettimeofday.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libgloss/csky/io-gettimeofday.c b/libgloss/csky/io-gettimeofday.c
> index 77f446fb800c..59b1abb8329e 100644
> --- a/libgloss/csky/io-gettimeofday.c
> +++ b/libgloss/csky/io-gettimeofday.c
> @@ -43,7 +43,7 @@ int gettimeofday (struct timeval *tv, void *tzvp)
> return -1;
> }
> parameters[0] = (uint32_t) >v;
> - parameters[1] = NULL;
> + parameters[1] = 0;
> ret = __hosted (HOSTED_GETTIMEOFDAY, parameters);
> __hosted_from_gdb_timeval (>v, tv);
> errno = __hosted_from_gdb_errno (parameters[0]);
> --
> 2.39.0
Makes sense
Thanks,
Corinna
prev parent reply other threads:[~2023-01-13 10:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-13 4:37 Mike Frysinger
2023-01-13 10:12 ` Corinna Vinschen [this message]
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=Y8Euqj2R5nlTobPT@calimero.vinschen.de \
--to=vinschen@redhat.com \
--cc=newlib@sourceware.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).