patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [dpdk-dev] [PATCH] test: fix wrong function type casing
@ 2018-05-10  8:29 Jerin Jacob
  2018-05-10 15:58 ` De Lara Guarch, Pablo
  0 siblings, 1 reply; 2+ messages in thread
From: Jerin Jacob @ 2018-05-10  8:29 UTC (permalink / raw)
  To: dev; +Cc: thomas, andy, Jerin Jacob, bruce.richardson, stable

make flip_bit() as lcore_function_t.
Found this issue with gcc 8.1

test/test/test_distributor_perf.c: In function ‘time_cache_line_switch’:
test/test/test_distributor_perf.c:59:24: warning: cast between
incompatible function types from ‘void (*)(volatile uint64_t *)’ {aka
‘void (*) (volatile long unsigned int *)’} to ‘int (*)(void *)’
[-Wcast-function-type] rte_eal_remote_launch((lcore_function_t *)flip_bit,
&data[0], slaveid);

Cc: bruce.richardson@intel.com
Cc: stable@dpdk.org

Fixes: c3eabff124e6 ("distributor: add unit tests")

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
---
 test/test/test_distributor_perf.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/test/test/test_distributor_perf.c b/test/test/test_distributor_perf.c
index 557715e13..edf1998ab 100644
--- a/test/test/test_distributor_perf.c
+++ b/test/test/test_distributor_perf.c
@@ -31,7 +31,7 @@ struct worker_stats worker_stats[RTE_MAX_LCORE];
  * worker thread used for testing the time to do a round-trip of a cache
  * line between two cores and back again
  */
-static void
+static int
 flip_bit(volatile uint64_t *arg)
 {
 	uint64_t old_val = 0;
@@ -41,6 +41,7 @@ flip_bit(volatile uint64_t *arg)
 		old_val = *arg;
 		*arg = 0;
 	}
+	return 0;
 }
 
 /*
-- 
2.17.0

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

* Re: [dpdk-stable] [dpdk-dev] [PATCH] test: fix wrong function type casing
  2018-05-10  8:29 [dpdk-stable] [dpdk-dev] [PATCH] test: fix wrong function type casing Jerin Jacob
@ 2018-05-10 15:58 ` De Lara Guarch, Pablo
  0 siblings, 0 replies; 2+ messages in thread
From: De Lara Guarch, Pablo @ 2018-05-10 15:58 UTC (permalink / raw)
  To: Jerin Jacob, dev; +Cc: thomas, andy, Richardson, Bruce, stable



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Jerin Jacob
> Sent: Thursday, May 10, 2018 9:29 AM
> To: dev@dpdk.org
> Cc: thomas@monjalon.net; andy@warmcat.com; Jerin Jacob
> <jerin.jacob@caviumnetworks.com>; Richardson, Bruce
> <bruce.richardson@intel.com>; stable@dpdk.org
> Subject: [dpdk-dev] [PATCH] test: fix wrong function type casing
> 
> make flip_bit() as lcore_function_t.
> Found this issue with gcc 8.1
> 
> test/test/test_distributor_perf.c: In function ‘time_cache_line_switch’:
> test/test/test_distributor_perf.c:59:24: warning: cast between incompatible
> function types from ‘void (*)(volatile uint64_t *)’ {aka ‘void (*) (volatile long
> unsigned int *)’} to ‘int (*)(void *)’
> [-Wcast-function-type] rte_eal_remote_launch((lcore_function_t *)flip_bit,
> &data[0], slaveid);
> 
> Cc: bruce.richardson@intel.com
> Cc: stable@dpdk.org
> 
> Fixes: c3eabff124e6 ("distributor: add unit tests")
> 
> Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
> ---

Already fixed here:

http://dpdk.org/dev/patchwork/patch/39717/


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

end of thread, other threads:[~2018-05-10 15:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-10  8:29 [dpdk-stable] [dpdk-dev] [PATCH] test: fix wrong function type casing Jerin Jacob
2018-05-10 15:58 ` De Lara Guarch, Pablo

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).