From 2649db6c3abb07523215faf1efb5035ce5487b20 Mon Sep 17 00:00:00 2001 From: Raphael <68374617+raphaelscholle@users.noreply.github.com> Date: Fri, 6 Sep 2024 20:06:15 +0200 Subject: [PATCH] respect ISO C90 --- os_dep/linux/rtw_proc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/os_dep/linux/rtw_proc.c b/os_dep/linux/rtw_proc.c index 1507969..853f880 100644 --- a/os_dep/linux/rtw_proc.c +++ b/os_dep/linux/rtw_proc.c @@ -6094,6 +6094,7 @@ static ssize_t proc_set_single_tone(struct file *file, const char __user *buffer char tmp[32]; u32 en, rf_path; + int num; // Move declaration to the top if (!padapter) return -EFAULT; @@ -6109,7 +6110,7 @@ static ssize_t proc_set_single_tone(struct file *file, const char __user *buffer } if (buffer && !copy_from_user(tmp, buffer, count)) { - int num = sscanf(tmp, "%u %u", &en, &rf_path); + num = sscanf(tmp, "%u %u", &en, &rf_path); // Now, `num` is already declared if (num < 1) return count; }