From: Pragya Gupta Date: Wed, 13 Jul 2016 08:50:22 +0000 (+0530) Subject: [7570] wlbt: Fix SWARM warnings in wifi host X-Git-Tag: MMI-QSBS30.62-17-8~72 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=de2a8779721cda3fcbd541f6f3f6e1d7acea70d8;p=GitHub%2FMotorolaMobilityLLC%2Fhardware-samsung_slsi-scsc_wifibt-wifi_hal.git [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 --- 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 @@ public: } 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 @@ static nl_sock * wifi_create_nl_socket(int port) 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 @@ void wifi_cleanup(wifi_handle handle, wifi_cleaned_up_handler handler) 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 @@ static int internal_valid_message_handler(nl_msg *msg, void *arg) //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 @@ public: ALOGE("handling reponse in %s", __func__); struct nlattr **tb = reply.attributes(); - struct genlmsghdr *gnlh = reply.header(); struct nlattr *mcgrp = NULL; int i;