Currently self_smpl_multi fails to compile in the default make configuration with recent compilers (such as clang v18) due to -Wunused-but-set-variable being triggered by the variable sum. This patch removes the variable to get rid of the warning as it is not used anywhere. --- perf_examples/self_smpl_multi.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/perf_examples/self_smpl_multi.c b/perf_examples/self_smpl_multi.c index 391fa61..b6a9c03 100644 --- a/perf_examples/self_smpl_multi.c +++ b/perf_examples/self_smpl_multi.c @@ -141,7 +141,7 @@ void do_cycles(void) { struct timeval start, last, now; - unsigned long x, sum; + unsigned long x; gettimeofday(&start, NULL); last = start; @@ -151,14 +151,12 @@ do_cycles(void) do { - sum = 1; for (x = 1; x < 250000; x++) { /* signal pending to private queue because of * pthread_kill(), i.e., tkill() */ if ((x % 5000) == 0) pthread_kill(pthread_self(), SIGUSR1); - sum += x; } iter[myid]++; -- 2.34.1
_______________________________________________ perfmon2-devel mailing list perfmon2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/perfmon2-devel