commit a96b8843f026f9c424201a45236df2ab9f5ef7c0
Author: Nicolas Viéville <nicolas.vieville(a)uphf.fr>
Date: Thu Aug 22 00:17:41 2024 +0200
Add patch to fix warning suggest braces around empty body in an ‘if’ statement -
kernel 6.10
Signed-off-by: Nicolas Viéville <nicolas.vieville(a)uphf.fr>
..._kernel_6.10_fix_empty_body_in_if_warning.patch | 57 ++++++++++++++++++++++
wl-kmod.spec | 2 +
2 files changed, 59 insertions(+)
---
diff --git a/wl-kmod-026_kernel_6.10_fix_empty_body_in_if_warning.patch
b/wl-kmod-026_kernel_6.10_fix_empty_body_in_if_warning.patch
new file mode 100644
index 0000000..ad47e58
--- /dev/null
+++ b/wl-kmod-026_kernel_6.10_fix_empty_body_in_if_warning.patch
@@ -0,0 +1,57 @@
+From 92a12d8861c51ec2f35aba4c746653fb0e9b7256 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Nicolas=20Vi=C3=A9ville?= <nicolas.vieville(a)uphf.fr>
+Date: Wed, 21 Aug 2024 19:35:27 +0200
+Subject: [PATCH] =?UTF-8?q?kernel=206.10:=20wl=5Flinux.c:=20fix=20warning?=
+ =?UTF-8?q?=20suggest=20braces=20around=20empty=20body=20in=20an=20?=
+ =?UTF-8?q?=E2=80=98if=E2=80=99=20statement?=
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Nicolas Viéville <nicolas.vieville(a)uphf.fr>
+---
+ src/wl/sys/wl_linux.c | 9 ++++++---
+ 1 file changed, 6 insertions(+), 3 deletions(-)
+
+diff --git a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c
+index 499752b..2000f6f 100644
+--- a/src/wl/sys/wl_linux.c
++++ b/src/wl/sys/wl_linux.c
+@@ -1100,8 +1100,9 @@ wl_open(struct net_device *dev)
+ }
+ WL_UNLOCK(wl);
+
+- if (!error)
++ if (!error) {
+ OLD_MOD_INC_USE_COUNT;
++ }
+
+ #if defined(USE_CFG80211)
+ if (wl_cfg80211_up(dev)) {
+@@ -1874,9 +1875,10 @@ wl_set_mac_address(struct net_device *dev, void *addr)
+ err = wlc_iovar_op(wl->wlc, "cur_etheraddr", NULL, 0, sa->sa_data,
ETHER_ADDR_LEN,
+ IOV_SET, (WL_DEV_IF(dev))->wlcif);
+ WL_UNLOCK(wl);
+- if (err)
++ if (err) {
+ WL_ERROR(("wl%d: wl_set_mac_address: error setting MAC addr override\n",
+ wl->pub->unit));
++ }
+ return err;
+ }
+
+@@ -2274,9 +2276,10 @@ wl_start(struct sk_buff *skb, struct net_device *dev)
+ if (!err) {
+ atomic_inc(&wl->callbacks);
+ wl->txq_dispatched = TRUE;
+- } else
++ } else {
+ WL_ERROR(("wl%d: wl_start/schedule_work failed\n",
+ wl->pub->unit));
++ }
+ }
+
+ TXQ_UNLOCK(wl);
+--
+2.46.0
+
diff --git a/wl-kmod.spec b/wl-kmod.spec
index 49af14a..1896fae 100644
--- a/wl-kmod.spec
+++ b/wl-kmod.spec
@@ -43,6 +43,7 @@ Patch21: wl-kmod-022_kernel_5.18_adaptation.patch
Patch22: wl-kmod-023_kernel_6.0_adaptation.patch
Patch23: wl-kmod-024_kernel_6.1_adaptation.patch
Patch24: wl-kmod-025_kernel_6.5_adaptation.patch
+Patch25: wl-kmod-026_kernel_6.10_fix_empty_body_in_if_warning.patch
# needed for plague to make sure it builds for i586 and i686
ExclusiveArch: i686 x86_64
@@ -108,6 +109,7 @@ pushd %{name}-%{version}-src
%patch -P 22 -p1 -b .kernel_6.0_adaptation
%patch -P 23 -p1 -b .kernel_6.1_adaptation
%patch -P 24 -p1 -b .kernel_6.5_adaptation
+%patch -P 25 -p1 -b .kernel_6.10_adaptation
# Manual patching to build for RHEL - inspired by CentOS wl-kmod.spec
# Actually works for RHEL 6.x and 7.x
Show replies by date