Re: [PATCH] libgloss: csky: fix pointer-to-integer warning

Corinna Vinschen <[email protected]>
Newsgroups gmane.comp.lib.newlib
Message-ID <[email protected]>
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) &gtv;
> -  parameters[1] = NULL;
> +  parameters[1] = 0;
>    ret = __hosted (HOSTED_GETTIMEOFDAY, parameters);
>    __hosted_from_gdb_timeval (&gtv, tv);
>    errno = __hosted_from_gdb_errno (parameters[0]);
> -- 
> 2.39.0

Makes sense


Thanks,
Corinna
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.