[7570] wlbt: Fix SWARM warnings in wifi host
Fixed SWARM warnings in wifi hal
Change-Id: I6222b2899a9eec1ff6004c6add1288959a461211
SCSC-Bug-Id: SSB-19413
Signed-off-by: Pragya Gupta <pragya.gupta@samsung.com>
diff --git a/cpp_bindings.h b/cpp_bindings.h
index 491c398..0864d87 100755
--- a/cpp_bindings.h
+++ b/cpp_bindings.h
@@ -245,7 +245,8 @@
}
virtual void addRef() {
- int refs = __sync_add_and_fetch(&mRefs, 1);
+ __sync_add_and_fetch(&mRefs, 1);
+ //int refs = __sync_add_and_fetch(&mRefs, 1);
// ALOGD("addRef: WifiCommand %p has %d references", this, refs);
}
diff --git a/wifi_hal.cpp b/wifi_hal.cpp
index e32374c..e3b78bf 100755
--- a/wifi_hal.cpp
+++ b/wifi_hal.cpp
@@ -71,25 +71,13 @@
wifi_socket_set_local_port(sock, port);
- struct sockaddr *addr = NULL;
- // ALOGI("sizeof(sockaddr) = %d, sizeof(sockaddr_nl) = %d", sizeof(*addr), sizeof(*addr_nl));
-
- ALOGI("Connecting socket");
+ ALOGI("Connecting socket");
if (nl_connect(sock, NETLINK_GENERIC)) {
ALOGE("Could not connect handle");
nl_socket_free(sock);
return NULL;
}
- ALOGI("Making socket nonblocking");
- /*
- if (nl_socket_set_nonblocking(sock)) {
- ALOGE("Could make socket non-blocking");
- nl_socket_free(sock);
- return NULL;
- }
- */
-
return sock;
}
@@ -285,11 +273,6 @@
int bad_commands = 0;
- for (int i = 0; i < info->num_event_cb; i++) {
- cb_info *cbi = &(info->event_cb[i]);
- WifiCommand *cmd = (WifiCommand *)cbi->cb_arg;
- }
-
while (info->num_cmd > bad_commands) {
int num_cmd = info->num_cmd;
cmd_info *cmdi = &(info->cmd[bad_commands]);
@@ -420,8 +403,6 @@
//ALOGI("event received %s, vendor_id = 0x%0x", event.get_cmdString(), vendor_id);
//event.log();
- bool dispatched = false;
-
pthread_mutex_lock(&info->cb_lock);
ALOGI("Number of events %d", info->num_event_cb);
@@ -496,7 +477,6 @@
ALOGE("handling reponse in %s", __func__);
struct nlattr **tb = reply.attributes();
- struct genlmsghdr *gnlh = reply.header();
struct nlattr *mcgrp = NULL;
int i;