Skip to content

Commit 706bb40

Browse files
committed
clang fix for A12 libwifihal
Tracked-On: OAM-111118 Signed-off-by: vdanix <vishwanathx.dani@intel.com>
1 parent d1806f4 commit 706bb40

1 file changed

Lines changed: 59 additions & 0 deletions

File tree

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
From 870dfb02606894d001b9d56f9f07254da06bb3c3 Mon Sep 17 00:00:00 2001
2+
From: vdanix <vishwanathx.dani@intel.com>
3+
Date: Tue, 25 Jul 2023 07:49:48 +0530
4+
Subject: [PATCH] clang fix for A12 libwifihal
5+
6+
Tracked-On: OAM-111118
7+
Signed-off-by: vdanix <vishwanathx.dani@intel.com>
8+
9+
diff --git a/lib/driver_if.cpp b/lib/driver_if.cpp
10+
index 5d6baed..eb809f2 100644
11+
--- a/lib/driver_if.cpp
12+
+++ b/lib/driver_if.cpp
13+
@@ -34,10 +34,6 @@
14+
#include <linux/nl80211.h>
15+
#include "hal_debug.h"
16+
17+
-#ifdef __clang_analyzer__
18+
-#define free
19+
-#endif
20+
-
21+
/* libnl 1.x compatibility code */
22+
#if !defined(CONFIG_LIBNL20) && !defined(CONFIG_LIBNL30)
23+
24+
@@ -1168,14 +1164,14 @@ static int station_dump_handler(struct nl_msg *msg, void *arg)
25+
hal_printf(MSG_ERROR, "%s: Failed to allocate memory", __func__);
26+
return NL_SKIP;
27+
}
28+
- assert(s);
29+
if (station_dump(msg, tb, s)) {
30+
free(s);
31+
return NL_SKIP;
32+
}
33+
34+
dl_list_add_tail(sta_list, &s->list);
35+
-
36+
+
37+
+ free(s);
38+
return NL_SKIP;
39+
}
40+
41+
@@ -1387,6 +1383,7 @@ static int survey_handler(struct nl_msg *msg, void *arg)
42+
43+
dl_list_add_tail(survey_list, &survey->list);
44+
45+
+ free(survey);
46+
return NL_SKIP;
47+
}
48+
49+
@@ -1573,7 +1570,6 @@ void *driver_if_init(void *handle, drv_event_cb event_cb, u32 ifidx)
50+
51+
hal_printf(MSG_DEBUG, "%s: ifidx=%u", __func__, ifidx);
52+
53+
- assert(drv);
54+
drv->nl_cb = nl_cb_alloc(NL_CB_DEFAULT);
55+
if (!drv->nl_cb) {
56+
hal_printf(MSG_ERROR, "Failed to allocate netlink callback!");
57+
--
58+
2.41.0
59+

0 commit comments

Comments
 (0)