From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EE426606A327 for ; Mon, 30 Nov 2026 21:56:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=networkplumber-org.20260707.gappssmtp.com header.i=@networkplumber-org.20260707.gappssmtp.com header.a=rsa-sha256 header.s=20260707 header.b=T5QDKAaE Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A73C340E42; Mon, 30 Nov 2026 22:52:48 +0100 (CET) Received: from mail-pg1-f176.google.com (mail-pg1-f176.google.com [209.85.215.176]) by mails.dpdk.org (Postfix) with ESMTPS id D968F40678 for ; Mon, 30 Nov 2026 22:52:29 +0100 (CET) Received: by mail-pg1-f176.google.com with SMTP id 41be03b00d2f7-cd60c5da24cso6326449a12.0 for ; Mon, 30 Nov 2026 13:52:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20260707.gappssmtp.com; s=20260707; t=1796075548; x=1796680348; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=V1E5buqXQA11hrlrhkc14bxEU6IwWfMryhNpFKp7eFg=; b=T5QDKAaEVtlgZ0kuid8XEKV2lwAPVeQFeiIZQQ4rYRorwzsbBwdlStsRGTRxbOTbzd pY3UWOxv5zaEkkRdT4zSMUp3MjRHGHbhwGi6sufPLTihRFd704ewtG255+e278dWgvXJ Ja2i4pKUZ3ZtUytNbmOxNAsTt1pyBk+3uovCMRe7H/it5XGA6f9dRrpBN1gJx/KlBINf TbAhAHm9fqBvXNl0+YP21qtkNMpeQOgtJmKqfkk2vPs8wFyZ+DKiaixwXVFLKTrku7xQ /FfPlygAW+MYdVtG7mMXJrl3yNYsTFVy6C9hvakz5a4haoPjybnnPcXhgpmkYrb5AC90 pGyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796075548; x=1796680348; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=V1E5buqXQA11hrlrhkc14bxEU6IwWfMryhNpFKp7eFg=; b=iOyQe9Z/iY8LUvoOhO4veFaIzMZtMQ1kVQ1wV1hofWxwrykSlRl+1GBLdm55y/MXCA xUDxYYCTu1zgY/zY01nQjF1blc9L5bNrMq0//SJBFCzL/h86gKgnIjlby2D/vZeANqIo D9iUW6vqVhtqVcN2VX99vnMKgYugucMX3b9+uCbKNdA1IdHYkqxdJR5bCeKp5DHtB1Xi Xup95ypzys90jD3oMUETNr5cHlB+Ir9D4kWsaPTYW8qET9kWUA9ReLJqguxp1whze+Wj JZ8nSG2mEuu+Ig1p14zOErDRLo1PZaeDgBM78o/iQGwJp8Lkew4vPdg/kBe3nB4BxPkf PvSQ== X-Gm-Message-State: APuU4Z8rQGOd4W486wYO41xGOhrA7iMATxGTsRkvfBPNMqpKXcH8X27O EGnMDPYqp2y0kaijqmVJI8b3O5mOxIfWgATHHS3sG8eKIgr4pJiqXYWWDMfCXHXkt5wHgkrsvxQ nWbR1S7k= X-Gm-Gg: AZFdTZfLSopB7g6hMjL306lk03uGZbBu/IRqxMJcVRmoxymEXwnjwqbIsoOFVuswMZZ 2UmsCm6Mb57ZxkUtEp7ZuY4X7B1Yu0v4ojb5KqoAFtLwAta0brs4dKyn/nPWjkEsFj6DQIi5Ubg jgxo5dYdTSWqOvD1DVrqWsmesmujbvSMgNLK4qtiWlEpo5/HtKXvBDlMigef6kG0FleMfJbQwep 7CT5B2yF+rzQaWcAFD/CBStNV7hO+njnBITayBA54Pyj/CM6eC8ujuW3NpQWg/NqHsrN31M6hci cwJFMFNxNVkcyooi7iLhelpguMS9j0fDfKyOrre2i9/SFFiT3wJbSmze3NwccEt9ZAsbgsJdMAg DTymYatnmk7xL70xeiZV+qJdl3dbCm2sgUazPaPEUmmYIAjBfQ9BCqKuHZYQL/3YEn4wN2K2oKl EfoNeK6u+pjMljwDQZ0+o894GuZ6KKzInT7Ix7fNrSDnHdYLMLaDHpdMMMbDEPc2OS/REU9n0sR mjNv0MHJ6H5EaTBKGQyrMdmHFRNrWaPK7IlenAYre+dseZZqSzTLGsPVTAnulI1cxlKDyOzjp/j I6ZPyZZVSYGPvTKten2ijoZcxMTdauJEagOwLwpm+j0UFQUVK3/pqncDi2Gz29Qymzxo X-Received: by 2002:a05:6a21:6f11:b0:3f9:386e:711 with SMTP id adf61e73a8af0-4014c3504d9mr37769129637.46.1796075548294; Mon, 30 Nov 2026 13:52:28 -0800 (PST) Received: from phoenix.lan (204-195-112-43.wavecable.com. [204.195.112.43]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-8c872e45756sm18561940b3a.27.2026.11.30.13.52.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Nov 2026 13:52:28 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Bruce Richardson Subject: [PATCH v2 35/38] examples: remove unreachable statements Date: Mon, 30 Nov 2026 13:49:41 -0800 Message-ID: <20261130215203.886245-36-stephen@networkplumber.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20261130215203.886245-1-stephen@networkplumber.org> References: <20261129205006.1440292-1-stephen@networkplumber.org> <20261130215203.886245-1-stephen@networkplumber.org> X-Archived-By: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Archive: List-Post: List-Help: List-Subscribe: , X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 Clang with -Wunreachable-code-aggressive reports break and return statements after rte_exit(), which does not return. Remove them. Signed-off-by: Stephen Hemminger Acked-by: Bruce Richardson --- examples/bond/main.c | 1 - examples/l2fwd-jobstats/main.c | 2 -- examples/l3fwd/main.c | 4 ---- examples/ntb/ntb_fwd.c | 1 - examples/vhost/main.c | 4 +--- 5 files changed, 1 insertion(+), 11 deletions(-) diff --git a/examples/bond/main.c b/examples/bond/main.c index 99359cd6fb..1d11a6687d 100644 --- a/examples/bond/main.c +++ b/examples/bond/main.c @@ -292,7 +292,6 @@ bond_port_init(void) rte_exit(EXIT_FAILURE, "port %u: promiscuous mode enable failed: %s\n", BOND_PORT, rte_strerror(-retval)); - return; } struct rte_ether_addr addr; diff --git a/examples/l2fwd-jobstats/main.c b/examples/l2fwd-jobstats/main.c index f654831897..e6c0cfddc9 100644 --- a/examples/l2fwd-jobstats/main.c +++ b/examples/l2fwd-jobstats/main.c @@ -949,8 +949,6 @@ main(int argc, char **argv) rte_exit(EXIT_FAILURE, "rte_eth_promiscuous_enable:err=%s, port=%u\n", rte_strerror(-ret), portid); - return ret; - } printf("Port %u, MAC address: " RTE_ETHER_ADDR_PRT_FMT "\n\n", diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c index 5d061a1cf7..f7e6ac7eec 100644 --- a/examples/l3fwd/main.c +++ b/examples/l3fwd/main.c @@ -619,8 +619,6 @@ parse_queue_size(const char *queue_size_arg, uint16_t *queue_size, int rx) rte_exit(EXIT_FAILURE, "Invalid rx-queue-size\n"); else rte_exit(EXIT_FAILURE, "Invalid tx-queue-size\n"); - - return; } if (value > UINT16_MAX) { @@ -630,8 +628,6 @@ parse_queue_size(const char *queue_size_arg, uint16_t *queue_size, int rx) else rte_exit(EXIT_FAILURE, "tx-queue-size %lu > %d\n", value, UINT16_MAX); - - return; } *queue_size = value; diff --git a/examples/ntb/ntb_fwd.c b/examples/ntb/ntb_fwd.c index a53e8aae24..075ad355f0 100644 --- a/examples/ntb/ntb_fwd.c +++ b/examples/ntb/ntb_fwd.c @@ -1081,7 +1081,6 @@ ntb_parse_args(int argc, char **argv) ntb_usage(prgname); rte_exit(EXIT_FAILURE, "Command line is incomplete or incorrect.\n"); - break; } } } diff --git a/examples/vhost/main.c b/examples/vhost/main.c index e7434fd189..b1ad7ac676 100644 --- a/examples/vhost/main.c +++ b/examples/vhost/main.c @@ -1431,7 +1431,7 @@ static const struct rte_vhost_device_ops virtio_net_device_ops = * This is a thread will wake up after a period to print stats if the user has * enabled them. */ -static uint32_t +static __rte_noreturn uint32_t print_stats(__rte_unused void *arg) { struct vhost_dev *vdev; @@ -1475,8 +1475,6 @@ print_stats(__rte_unused void *arg) fflush(stdout); } - - return 0; } static void -- 2.53.0