[XS] Change in openvpn[master]: Silence warning with gcc 15 and O0/01
"cron2 \(Code Review\) via Openvpn-devel" <[email protected]> Fri, 24 Jul 2026 16:25:53 +0000
| Newsgroups | gmane.network.openvpn.devel |
|---|---|
| Message-ID | <[email protected]> |
cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/1731?usp=email )
Change subject: Silence warning with gcc 15 and O0/01
......................................................................
Silence warning with gcc 15 and O0/01
When compiling with low optimisation level gcc complains
route.c:1783:44: error: conversion from ‘int’ to ‘uint8_t’ {aka ‘unsigned char’} may change value [-Werror=conversion]
1783 | r6->network.s6_addr[byte--] &= (0xff << bits_to_clear);
With higher it apparently detects that this is cannot be and does not
trigger the warning. Explicitly cast to uint8_t to silence this warning
Change-Id: I96d3698601bb5aac3a0d7ac6ac5b5dd23c975517
Signed-off-by: Arne Schwabe <[email protected]>
Acked-by: Frank Lichtenheld <[email protected]>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1731
Message-Id: <[email protected]>
URL: https://www.mail-archive.com/[email protected]/msg37816.html
Signed-off-by: Gert Doering <[email protected]>
---
M src/openvpn/route.c
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/openvpn/route.c b/src/openvpn/route.c
index 81ce867..8ea745d 100644
--- a/src/openvpn/route.c
+++ b/src/openvpn/route.c
@@ -1780,7 +1780,7 @@
}
else
{
- r6->network.s6_addr[byte--] &= (0xff << bits_to_clear);
+ r6->network.s6_addr[byte--] &= (uint8_t)(0xff << bits_to_clear);
bits_to_clear = 0;
}
}
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1731?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I96d3698601bb5aac3a0d7ac6ac5b5dd23c975517
Gerrit-Change-Number: 1731
Gerrit-PatchSet: 2
Gerrit-Owner: plaisthos <[email protected]>
Gerrit-Reviewer: flichtenheld <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel