patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH] latencystats: fix missing f suffix on literal float
@ 2024-04-15 21:32 Tyler Retzlaff
  2024-04-15 22:17 ` Stephen Hemminger
  0 siblings, 1 reply; 4+ messages in thread
From: Tyler Retzlaff @ 2024-04-15 21:32 UTC (permalink / raw)
  To: dev; +Cc: Harry van Haaren, Remy Horton, Reshma Pattan, Tyler Retzlaff, stable

Add missing f suffix to floating point literal to avoid warning about
truncation from double to float.

Fixes: 5cd3cac9ed22 ("latency: added new library for latency stats")
Cc: reshma.pattan@intel.com
Cc: stable@dpdk.org

Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
 lib/latencystats/rte_latencystats.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/latencystats/rte_latencystats.c b/lib/latencystats/rte_latencystats.c
index 4ea9b0d..cae4b50 100644
--- a/lib/latencystats/rte_latencystats.c
+++ b/lib/latencystats/rte_latencystats.c
@@ -166,7 +166,7 @@ struct latency_stats_nameoff {
 	 * a constant smoothing factor between 0 and 1. The value
 	 * is used below for measuring average latency.
 	 */
-	const float alpha = 0.2;
+	const float alpha = 0.2f;
 
 	now = rte_rdtsc();
 	for (i = 0; i < nb_pkts; i++) {
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-05-29 14:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-15 21:32 [PATCH] latencystats: fix missing f suffix on literal float Tyler Retzlaff
2024-04-15 22:17 ` Stephen Hemminger
2024-04-15 23:14   ` Tyler Retzlaff
2024-05-29 14:38     ` Thomas Monjalon

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 NNTP newsgroup(s).