From patchwork Fri Jul 5 13:27:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcus Haehnel X-Patchwork-Id: 1957330 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=kernkonzept.com header.i=@kernkonzept.com header.a=rsa-sha256 header.s=mx1 header.b=frNrghFO; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=uclibc-ng.org (client-ip=2a00:1828:2000:679::23; helo=helium.openadk.org; envelope-from=devel-bounces@uclibc-ng.org; receiver=patchwork.ozlabs.org) Received: from helium.openadk.org (helium.openadk.org [IPv6:2a00:1828:2000:679::23]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WFwDz2RMWz1xpP for ; Sat, 6 Jul 2024 00:02:08 +1000 (AEST) Received: from helium.openadk.org (localhost [IPv6:::1]) by helium.openadk.org (Postfix) with ESMTP id 4C3DB35363AF; Fri, 5 Jul 2024 16:01:56 +0200 (CEST) Authentication-Results: helium.openadk.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=kernkonzept.com header.i=@kernkonzept.com header.a=rsa-sha256 header.s=mx1 header.b=frNrghFO; dkim-atps=neutral Received: from mx.kernkonzept.com (serv1.kernkonzept.com [159.69.200.6]) by helium.openadk.org (Postfix) with ESMTPS id 13E343528257 for ; Fri, 5 Jul 2024 16:01:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=kernkonzept.com; s=mx1; h=Content-Transfer-Encoding:MIME-Version:Message-ID :Date:Subject:Cc:To:From:References:In-Reply-To:Reply-To:Content-Type: Content-ID:Content-Description; bh=vvvLIgMlACwda8bud+fQhiwwHgaEtVZtednfvQtYcsk=; b=frNrghFO9eV5vQHHOydmZNV4Xt 0KsL8b1Fpb+R9DYBk4TxQ+OaLnhOhBtcpwYTSx9P8kuO/lt7oq/ps9G+GNZRRUdeykZylCbOjiWF4 bw0HHis4gZxBtQ1A1AGEXZZvDWthePiY7JJZsg0XqMKyMjC7P5cRJ59VOP7Wqaf4qPE4oyPn4RXgB B0O0OGENuBz8fyVPbK2qghI4Ysw9FhrYagS2PJf5+8mfOoBwssaik7rw5zDJe4GuzNKA3Lkes3Uwt xbL1lGkD4alU1D4wTQp+sHUDVlu4CJycyuC8745EnwmsoQlTJCqremPjiZGulurZU+SVNI8atssAJ Txfs/f0A==; Received: from ipb21a422b.dynamic.kabel-deutschland.de ([178.26.66.43] helo=amethyst.dd1.int.kernkonzept.com) by mx.kernkonzept.com with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) id 1sPjVG-000H1z-2P; Fri, 05 Jul 2024 16:01:35 +0200 From: Marcus Haehnel To: devel@uclibc-ng.org Date: Fri, 5 Jul 2024 15:27:17 +0200 Message-ID: <20240705132726.5205-1-marcus.haehnel@kernkonzept.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Message-ID-Hash: KVQHJ6REZSNHNI2F2QUFBEC2UL2J7FXA X-Message-ID-Hash: KVQHJ6REZSNHNI2F2QUFBEC2UL2J7FXA X-MailFrom: marcus.haehnel@kernkonzept.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Marcus Haehnel , Sven Linker X-Mailman-Version: 3.3.3 Precedence: list Subject: [uclibc-ng-devel] [PATCH] uclibc: Fix double promotion warning List-Id: uClibc-ng Development Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Add casts where necessary to convince clang that the promotion of float to double is intentional. Signed-off-by: Sven Linker --- libm/cexp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libm/cexp.c b/libm/cexp.c index 87512b7c5..a08d12d4e 100644 --- a/libm/cexp.c +++ b/libm/cexp.c @@ -38,10 +38,10 @@ libm_hidden_proto(cexpf) __complex__ float cexpf(__complex__ float z) { __complex__ float ret; - double r_exponent = exp(__real__ z); + double r_exponent = exp((double)__real__ z); - __real__ ret = r_exponent * cosf(__imag__ z); - __imag__ ret = r_exponent * sinf(__imag__ z); + __real__ ret = r_exponent * (double) cosf(__imag__ z); + __imag__ ret = r_exponent * (double) sinf(__imag__ z); return ret; }