From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Subject: Unreachable code in examples.
Date: Fri, 23 Oct 2026 08:46:19 -0700 [thread overview]
Message-ID: <20261023084619.1da78551@phoenix.local> (raw)
Building DPDK with clang and -Wunreachable-code shows a common pattern
across many examples. They all have a for(;;) loop but no exit condition
for the loop.
There are two options here.
- do real signal and cleanup (preferred)
- remove the dead code.
I am busy but if someone wants to spend 1/2 day doing and testing
this great.
[3666/3960] Compiling C object examples/dpdk-pipeline.p/pipeline_main.c.o
../examples/pipeline/main.c:188:2: warning: code will never be executed [-Wunreachable-code]
188 | rte_eal_cleanup();
| ^~~~~~~~~~~~~~~
1 warning generated.
[3687/3960] Compiling C object examples/dpdk-mp_client.p/multi_process_client_server_mp_mp_client_client.c.o
../examples/multi_process/client_server_mp/mp_client/client.c:272:2: warning: code will never be executed [-Wunreachable-code]
272 | rte_eal_cleanup();
| ^~~~~~~~~~~~~~~
1 warning generated.
[3715/3960] Compiling C object examples/dpdk-timer.p/timer_main.c.o
../examples/timer/main.c:126:2: warning: code will never be executed [-Wunreachable-code]
126 | (void) lcore_mainloop(NULL);
| ^ ~~~~~~~~~~~~~~~~~~~~
1 warning generated.
[3735/3960] Compiling C object examples/dpdk-service_cores.p/service_cores_main.c.o
../examples/service_cores/main.c:226:2: warning: code will never be executed [-Wunreachable-code]
226 | rte_eal_cleanup();
| ^~~~~~~~~~~~~~~
1 warning generated.
[3763/3960] Compiling C object examples/dpdk-efd_node.p/server_node_efd_efd_node_node.c.o
../examples/server_node_efd/efd_node/node.c:394:2: warning: code will never be executed [-Wunreachable-code]
394 | rte_eal_cleanup();
| ^~~~~~~~~~~~~~~
1 warning generated.
[3788/3960] Compiling C object examples/dpdk-rxtx_callbacks.p/rxtx_callbacks_main.c.o
../examples/rxtx_callbacks/main.c:348:2: warning: code will never be executed [-Wunreachable-code]
348 | rte_eal_cleanup();
| ^~~~~~~~~~~~~~~
1 warning generated.
[3816/3960] Compiling C object examples/dpdk-skeleton.p/skeleton_basicfwd.c.o
../examples/skeleton/basicfwd.c:218:2: warning: code will never be executed [-Wunreachable-code]
218 | rte_eal_cleanup();
| ^~~~~~~~~~~~~~~
reply other threads:[~2026-10-23 15:46 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261023084619.1da78551@phoenix.local \
--to=stephen@networkplumber.org \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox