Linux bluetooth development
 help / color / mirror / Atom feed
* [BlueZ 1/3] mesh: Remove unused but set variable
@ 2026-05-11 11:35 Bastien Nocera
  2026-05-11 11:35 ` [BlueZ 2/3] mesh: Fix str{r,}chr usage Bastien Nocera
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Bastien Nocera @ 2026-05-11 11:35 UTC (permalink / raw)
  To: linux-bluetooth

We played around with the bits, but didn't do anything with it.

mesh/net.c: In function ‘ack_received’:
mesh/net.c:1569:18: error: variable ‘ack_copy’ set but not used [-Werror=unused-but-set-variable=]
 1569 |         uint32_t ack_copy = ack_flag;
      |                  ^~~~~~~~
---
 mesh/net.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/mesh/net.c b/mesh/net.c
index b29e24f5d4a9..2c1be1f2cc63 100644
--- a/mesh/net.c
+++ b/mesh/net.c
@@ -1566,7 +1566,6 @@ static void ack_received(struct mesh_net *net, bool timeout,
 {
 	struct mesh_sar *outgoing;
 	uint32_t seg_flag = 0x00000001;
-	uint32_t ack_copy = ack_flag;
 	uint16_t i;
 
 	l_debug("ACK Rxed (%x) (to:%d): %8.8x", seq0, timeout, ack_flag);
@@ -1599,8 +1598,6 @@ static void ack_received(struct mesh_net *net, bool timeout,
 
 	outgoing->last_nak |= ack_flag;
 
-	ack_copy &= outgoing->flags;
-
 	for (i = 0; i <= SEG_MAX(true, outgoing->len); i++, seg_flag <<= 1) {
 		if (seg_flag & ack_flag) {
 			l_debug("Skipping Seg %d of %d",
@@ -1608,8 +1605,6 @@ static void ack_received(struct mesh_net *net, bool timeout,
 			continue;
 		}
 
-		ack_copy |= seg_flag;
-
 		l_debug("Resend Seg %d net:%p dst:%x app_idx:%3.3x",
 				i, net, outgoing->remote, outgoing->app_idx);
 
-- 
2.54.0


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

end of thread, other threads:[~2026-05-12 19:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-11 11:35 [BlueZ 1/3] mesh: Remove unused but set variable Bastien Nocera
2026-05-11 11:35 ` [BlueZ 2/3] mesh: Fix str{r,}chr usage Bastien Nocera
2026-05-11 11:35 ` [BlueZ 3/3] mesh: Fix const qualifier dropping when using strchr() Bastien Nocera
2026-05-11 14:27 ` [BlueZ,1/3] mesh: Remove unused but set variable bluez.test.bot
2026-05-12 19:20 ` [BlueZ 1/3] " patchwork-bot+bluetooth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox