From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 19F723858D32 for ; Fri, 13 Jan 2023 10:13:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 19F723858D32 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673604792; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references; bh=fZgZL3DaTidfIK3eIFgyKnxn1xPKWylCwEwBbs40Vv0=; b=LJZNxsiu1LTcw8JlK9CrrNUQPqwUjKohBabVgDTbirkQ3nK4cVS3HXNNuzBZfbKSVuU/eV 2lcTDYooc11gucslHTgYJ4gw8UMrmNGmdUGAqxQpyL1rx3cFVrzSg38/oYoKPHwcCX2vGj Az9tPmHxOe+zClDfvP9sZZucBKy1QWs= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-101-VbBcvj6TNbO7R8gbDMeCug-1; Fri, 13 Jan 2023 05:13:00 -0500 X-MC-Unique: VbBcvj6TNbO7R8gbDMeCug-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E76F785A588 for ; Fri, 13 Jan 2023 10:12:59 +0000 (UTC) Received: from calimero.vinschen.de (unknown [10.39.193.197]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C1C7951EF for ; Fri, 13 Jan 2023 10:12:59 +0000 (UTC) Received: by calimero.vinschen.de (Postfix, from userid 500) id 9AA83A80B93; Fri, 13 Jan 2023 11:12:58 +0100 (CET) Date: Fri, 13 Jan 2023 11:12:58 +0100 From: Corinna Vinschen To: newlib@sourceware.org Subject: Re: [PATCH] libgloss: csky: fix pointer-to-integer warning Message-ID: Reply-To: newlib@sourceware.org Mail-Followup-To: newlib@sourceware.org References: <20230113043757.8827-1-vapier@gentoo.org> MIME-Version: 1.0 In-Reply-To: <20230113043757.8827-1-vapier@gentoo.org> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Disposition: inline X-Spam-Status: No, score=-10.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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