1
1
openwrt/target/linux/generic/hack-6.18/950-silence-unused-variable-warnings.patch
John Audia 17f5538441 kernel: bump 6.18 to 6.18.33
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.18.33

Removed upstreamed:
  generic/backport-6.18/742-v7.1-r8152-fix-incorrect-register-write-to-USB_UPHY_XTAL.patch[1]
  generic/backport-6.18/827-v7.0-crypto-inside-secure-eip93-fix-register-definition.patch[2]
  generic/backport-6.18/828-v7.0-crypto-inside-secure-eip93-register-hash-before-auth.patch[3]
  generic/backport-6.18/940-v7.1-net-dsa-realtek-rtl8365mb-fix-mode-mask-calculation.patch[4]
  generic/pending-6.18/928-crypto-eip93-fix-hmac-setkey-algo-selection.patch[5]

All other patches automatically rebased via update_kernel.sh

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.18.33&id=50c601805fe3
2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.18.33&id=7ed07c9ce525
3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.18.33&id=b6263eb2b188
4. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.18.33&id=b707f3109f1a
5. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.18.33&id=fc9310d79fdb

Build system: x86/64
Build-tested: x86/64-glibc
Run-tested: x86/64-glibc

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/23419
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-05-25 21:04:53 +02:00

48 lines
1.6 KiB
Diff

From: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Date: Wed, 07 Jan 2026 01:30:15 +0100
Subject: [PATCH] Silence unused-variable warnings in ipv6.h and tcp_input.c
This patch silences compiler warnings about unused variables by explicitly
casting them to void where appropriate.
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
---
include/net/ipv6.h | 6 ++++++
net/ipv4/tcp_input.c | 7 +++++++
2 files changed, 13 insertions(+)
--- a/include/net/ipv6.h
+++ b/include/net/ipv6.h
@@ -248,6 +248,8 @@ extern int sysctl_mld_qrv;
struct inet6_dev *_idev = (idev); \
unsigned long _field = (field); \
unsigned long _val = (val); \
+ (void)_field; \
+ (void)_val; \
if (likely(_idev != NULL)) \
mod##SNMP_ADD_STATS((_idev)->stats.statname, _field, _val); \
mod##SNMP_ADD_STATS((net)->mib.statname##_statistics, _field, _val);\
@@ -257,6 +259,7 @@ extern int sysctl_mld_qrv;
({ \
struct inet6_dev *_idev = (idev); \
unsigned long _val = (val); \
+ (void)_val; \
if (likely(_idev != NULL)) \
mod##SNMP_UPD_PO_STATS((_idev)->stats.statname, field, _val); \
mod##SNMP_UPD_PO_STATS((net)->mib.statname##_statistics, field, _val);\
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -3969,6 +3969,12 @@ static u32 tcp_newly_delivered(struct so
struct tcp_sock *tp = tcp_sk(sk);
u32 delivered;
+ /* ecn_count is only used when FLAG_ECE is set; in some build/config
+ * paths it may be unused and cause a compiler warning. Silence it
+ * explicitly here.
+ */
+ (void)ecn_count;
+
delivered = tp->delivered - prior_delivered;
NET_ADD_STATS(net, LINUX_MIB_TCPDELIVERED, delivered);