diff options
author | Srinivas Girigowda <sgirigow@codeaurora.org> | 2016-07-01 12:05:22 -0700 |
---|---|---|
committer | Kumar Anand <kumaranand@google.com> | 2016-07-15 16:37:33 -0700 |
commit | 0919dfde526ab1f2996334835cbd176906e89d0e (patch) | |
tree | f0131ea6b3f87f14a48ef603300af8eb1f4547e3 /qcwcn | |
parent | d61feef589f6f3bd8840a61129d6da2e5c020577 (diff) | |
download | wlan-0919dfde526ab1f2996334835cbd176906e89d0e.tar.gz |
WiFi-HAL: Fix CLANG warnings
Fix CLANG warnings.
Change-Id: If07194f34abc44e1e58e8b38af59ec705a62ce55
CRs-Fixed: 1015162
Bug: 28825972
Diffstat (limited to 'qcwcn')
-rw-r--r-- | qcwcn/wifi_hal/Android.mk | 2 | ||||
-rw-r--r-- | qcwcn/wifi_hal/cpp_bindings.cpp | 2 | ||||
-rw-r--r-- | qcwcn/wifi_hal/gscan.cpp | 60 | ||||
-rw-r--r-- | qcwcn/wifi_hal/gscan_event_handler.cpp | 2 | ||||
-rw-r--r--[-rwxr-xr-x] | qcwcn/wifi_hal/ifaceeventhandler.cpp | 8 | ||||
-rw-r--r--[-rwxr-xr-x] | qcwcn/wifi_hal/ifaceeventhandler.h | 1 | ||||
-rw-r--r-- | qcwcn/wifi_hal/llstats.cpp | 3 | ||||
-rw-r--r-- | qcwcn/wifi_hal/nan.cpp | 3 | ||||
-rw-r--r-- | qcwcn/wifi_hal/rtt.cpp | 15 | ||||
-rw-r--r--[-rwxr-xr-x] | qcwcn/wifi_hal/tdls.cpp | 9 | ||||
-rw-r--r-- | qcwcn/wifi_hal/wifi_hal.cpp | 12 | ||||
-rw-r--r-- | qcwcn/wifi_hal/wificonfig.cpp | 6 | ||||
-rw-r--r-- | qcwcn/wifi_hal/wifilogger.cpp | 11 | ||||
-rw-r--r-- | qcwcn/wifi_hal/wifilogger_diag.cpp | 8 | ||||
-rw-r--r-- | qcwcn/wifi_hal/wifilogger_diag.h | 5 | ||||
-rw-r--r-- | qcwcn/wpa_supplicant_8_lib/Android.mk | 2 | ||||
-rw-r--r-- | qcwcn/wpa_supplicant_8_lib/driver_cmd_nl80211.c | 15 |
17 files changed, 14 insertions, 150 deletions
diff --git a/qcwcn/wifi_hal/Android.mk b/qcwcn/wifi_hal/Android.mk index 9c7e5df..15d885d 100644 --- a/qcwcn/wifi_hal/Android.mk +++ b/qcwcn/wifi_hal/Android.mk @@ -73,7 +73,7 @@ include $(CLEAR_VARS) LOCAL_REQUIRED_MODULES := -LOCAL_CFLAGS += -Wno-unused-parameter +LOCAL_CFLAGS += -Wno-unused-parameter -Wall -Werror LOCAL_CPPFLAGS += -Wno-conversion-null ifeq ($(TARGET_BUILD_VARIANT),userdebug) LOCAL_CFLAGS += "-DLOG_NDEBUG=0" diff --git a/qcwcn/wifi_hal/cpp_bindings.cpp b/qcwcn/wifi_hal/cpp_bindings.cpp index e3459c0..64aa317 100644 --- a/qcwcn/wifi_hal/cpp_bindings.cpp +++ b/qcwcn/wifi_hal/cpp_bindings.cpp @@ -755,7 +755,6 @@ WifiVendorCommand::~WifiVendorCommand() int WifiVendorCommand::handleResponse(WifiEvent &reply) { struct nlattr **tb = reply.attributes(); - struct nlattr *attr = NULL; struct genlmsghdr *gnlh = reply.header(); if (gnlh->cmd == NL80211_CMD_VENDOR) { @@ -772,7 +771,6 @@ int WifiVendorCommand::handleResponse(WifiEvent &reply) int WifiVendorCommand::handleEvent(WifiEvent &event) { struct nlattr **tb = event.attributes(); - struct nlattr *attr = NULL; struct genlmsghdr *gnlh = event.header(); if (gnlh->cmd == NL80211_CMD_VENDOR) { diff --git a/qcwcn/wifi_hal/gscan.cpp b/qcwcn/wifi_hal/gscan.cpp index c2733bb..5adba77 100644 --- a/qcwcn/wifi_hal/gscan.cpp +++ b/qcwcn/wifi_hal/gscan.cpp @@ -86,12 +86,11 @@ wifi_error cleanupGscanHandlers(hal_info *info) wifi_error wifi_get_valid_channels(wifi_interface_handle handle, int band, int max_channels, wifi_channel *channels, int *num_channels) { - int requestId, ret = 0, i=0; + int requestId, ret = 0; GScanCommand *gScanCommand; struct nlattr *nlData; interface_info *ifaceInfo = getIfaceInfo(handle); wifi_handle wifiHandle = getWifiHandle(handle); - hal_info *info = getHalInfo(wifiHandle); lowi_cb_table_t *lowiWifiHalApi = NULL; /* Route GSCAN request through LOWI if supported */ @@ -179,7 +178,6 @@ wifi_error wifi_get_gscan_capabilities(wifi_interface_handle handle, int requestId, ret = 0; GScanCommand *gScanCommand; struct nlattr *nlData; - wifi_gscan_capabilities tCapabilities; interface_info *ifaceInfo = getIfaceInfo(handle); wifi_handle wifiHandle = getWifiHandle(handle); hal_info *info = getHalInfo(wifiHandle); @@ -286,7 +284,6 @@ wifi_error wifi_start_gscan(wifi_request_id id, u32 num_scan_buckets, numChannelSpecs; wifi_scan_bucket_spec bucketSpec; struct nlattr *nlBuckectSpecList; - bool previousGScanRunning = false; hal_info *info = getHalInfo(wifiHandle); lowi_cb_table_t *lowiWifiHalApi = NULL; gscan_event_handlers* event_handlers; @@ -601,7 +598,6 @@ wifi_error wifi_set_bssid_hotlist(wifi_request_id id, struct nlattr *nlData, *nlApThresholdParamList; interface_info *ifaceInfo = getIfaceInfo(iface); wifi_handle wifiHandle = getWifiHandle(iface); - bool previousGScanSetBssidRunning = false; hal_info *info = getHalInfo(wifiHandle); lowi_cb_table_t *lowiWifiHalApi = NULL; gscan_event_handlers* event_handlers; @@ -870,7 +866,6 @@ wifi_error wifi_set_significant_change_handler(wifi_request_id id, struct nlattr *nlData, *nlApThresholdParamList; interface_info *ifaceInfo = getIfaceInfo(iface); wifi_handle wifiHandle = getWifiHandle(iface); - bool previousGScanSetSigChangeRunning = false; hal_info *info = getHalInfo(wifiHandle); lowi_cb_table_t *lowiWifiHalApi = NULL; gscan_event_handlers* event_handlers; @@ -1151,14 +1146,8 @@ wifi_error wifi_get_cached_gscan_results(wifi_interface_handle iface, int *num) { int requestId, ret = 0, retRequestRsp = 0; - wifi_cached_scan_results *result = results; - u32 j = 0; - int i = 0; - u8 moreData = 0; - u16 waitTime = GSCAN_EVENT_WAIT_TIME_SECONDS; GScanCommand *gScanCommand; struct nlattr *nlData; - wifi_cached_scan_results *cached_results; lowi_cb_table_t *lowiWifiHalApi = NULL; interface_info *ifaceInfo = getIfaceInfo(iface); @@ -1390,49 +1379,12 @@ out: return ret; } -/* Callback handlers registered for nl message send */ -static int error_handler_gscan(struct sockaddr_nl *nla, struct nlmsgerr *err, - void *arg) -{ - struct sockaddr_nl *tmp; - int *ret = (int *)arg; - tmp = nla; - *ret = err->error; - ALOGE("%s: Error code:%d (%s)", __FUNCTION__, *ret, strerror(-(*ret))); - return NL_STOP; -} - -/* Callback handlers registered for nl message send */ -static int ack_handler_gscan(struct nl_msg *msg, void *arg) -{ - int *ret = (int *)arg; - struct nl_msg * a; - - ALOGE("%s: called", __FUNCTION__); - a = msg; - *ret = 0; - return NL_STOP; -} - -/* Callback handlers registered for nl message send */ -static int finish_handler_gscan(struct nl_msg *msg, void *arg) -{ - int *ret = (int *)arg; - struct nl_msg * a; - - ALOGE("%s: called", __FUNCTION__); - a = msg; - *ret = 0; - return NL_SKIP; -} - int GScanCommand::requestResponse() { return WifiCommand::requestResponse(mMsg); } int GScanCommand::handleResponse(WifiEvent &reply) { - u32 status; int i = 0; int ret = WIFI_SUCCESS; u32 val; @@ -1526,7 +1478,6 @@ int GScanCommand::handleResponse(WifiEvent &reply) { { wifi_request_id id; u32 numResults = 0; - u32 startingIndex; int firstScanIdInPatch = -1; if (!tbVendor[ @@ -2093,7 +2044,6 @@ wifi_error wifi_set_epno_list(wifi_request_id id, struct nlattr *nlData, *nlPnoParamList; interface_info *ifaceInfo = getIfaceInfo(iface); wifi_handle wifiHandle = getWifiHandle(iface); - bool previousGScanSetEpnoListRunning = false; hal_info *info = getHalInfo(wifiHandle); gscan_event_handlers* event_handlers; GScanCommandEventHandler *gScanSetPnoListCmdEventHandler; @@ -2347,12 +2297,11 @@ wifi_error wifi_set_passpoint_list(wifi_request_id id, wifi_passpoint_network *networks, wifi_passpoint_event_handler handler) { - int i, numAp, ret = 0; + int i, ret = 0; GScanCommand *gScanCommand; struct nlattr *nlData, *nlPasspointNetworksParamList; interface_info *ifaceInfo = getIfaceInfo(iface); wifi_handle wifiHandle = getWifiHandle(iface); - bool previousGScanPnoSetPasspointListRunning = false; hal_info *info = getHalInfo(wifiHandle); gscan_event_handlers* event_handlers; GScanCommandEventHandler *gScanPnoSetPasspointListCmdEventHandler; @@ -2602,8 +2551,6 @@ cleanup: int GScanCommand::allocCachedResultsTemp(int max, wifi_cached_scan_results *cached_results) { - wifi_cached_scan_results *tempCachedResults = NULL; - /* Alloc memory for "max" number of cached results. */ mGetCachedResultsRspParams->cached_results = (wifi_cached_scan_results*) @@ -2664,9 +2611,6 @@ int GScanCommand::allocRspParams(eGScanRspRarams cmd) void GScanCommand::freeRspParams(eGScanRspRarams cmd) { - u32 i = 0; - wifi_cached_scan_results *cached_results = NULL; - switch(cmd) { case eGScanGetCapabilitiesRspParams: diff --git a/qcwcn/wifi_hal/gscan_event_handler.cpp b/qcwcn/wifi_hal/gscan_event_handler.cpp index 314e56d..a68f2e6 100644 --- a/qcwcn/wifi_hal/gscan_event_handler.cpp +++ b/qcwcn/wifi_hal/gscan_event_handler.cpp @@ -1041,7 +1041,6 @@ int GScanCommandEventHandler::handleEvent(WifiEvent &event) { unsigned i=0; int ret = WIFI_SUCCESS; - u32 status; wifi_scan_result *result = NULL; struct nlattr *tbVendor[QCA_WLAN_VENDOR_ATTR_GSCAN_RESULTS_MAX + 1]; @@ -1722,7 +1721,6 @@ int GScanCommandEventHandler::handleEvent(WifiEvent &event) case QCA_NL80211_VENDOR_SUBCMD_GSCAN_SCAN_EVENT: { wifi_scan_event scanEvent; - u32 scanEventStatus = 0; wifi_request_id reqId; if (!tbVendor[ diff --git a/qcwcn/wifi_hal/ifaceeventhandler.cpp b/qcwcn/wifi_hal/ifaceeventhandler.cpp index 812c78d..88aa4d0 100755..100644 --- a/qcwcn/wifi_hal/ifaceeventhandler.cpp +++ b/qcwcn/wifi_hal/ifaceeventhandler.cpp @@ -41,8 +41,7 @@ wifi_error wifi_set_iface_event_handler(wifi_request_id id, wifi_interface_handle iface, wifi_event_handler eh) { - int i, numAp, ret = 0; - interface_info *ifaceInfo = getIfaceInfo(iface); + int ret = 0; wifi_handle wifiHandle = getWifiHandle(iface); /* Check if a similar request to set iface event handler was made earlier. @@ -73,7 +72,6 @@ wifi_error wifi_set_iface_event_handler(wifi_request_id id, } mwifiEventHandler->setCallbackHandler(eh); -cleanup: return (wifi_error)ret; } @@ -98,7 +96,6 @@ wifi_error wifi_reset_iface_event_handler(wifi_request_id id, ALOGV("Object mwifiEventHandler for id = %d already Deleted", id); } -cleanup: return (wifi_error)ret; } @@ -108,8 +105,6 @@ cleanup: */ int IfaceEventHandlerCommand::handleEvent(WifiEvent &event) { - int ret = WIFI_SUCCESS; - wifiEventHandler::handleEvent(event); switch(mSubcmd) @@ -222,7 +217,6 @@ int WifihalGeneric::handleResponse(WifiEvent &reply) { ALOGV("Got a Wi-Fi HAL module message from Driver"); int i = 0; - u32 status; WifiVendorCommand::handleResponse(reply); // Parse the vendordata and get the attribute diff --git a/qcwcn/wifi_hal/ifaceeventhandler.h b/qcwcn/wifi_hal/ifaceeventhandler.h index 266ce5f..2aa5d9c 100755..100644 --- a/qcwcn/wifi_hal/ifaceeventhandler.h +++ b/qcwcn/wifi_hal/ifaceeventhandler.h @@ -82,7 +82,6 @@ public: class WifihalGeneric: public WifiVendorCommand { private: - wifi_interface_handle mHandle; feature_set mSet; int mSetSizeMax; int *mSetSizePtr; diff --git a/qcwcn/wifi_hal/llstats.cpp b/qcwcn/wifi_hal/llstats.cpp index 419c3c0..2250987 100644 --- a/qcwcn/wifi_hal/llstats.cpp +++ b/qcwcn/wifi_hal/llstats.cpp @@ -32,7 +32,6 @@ LLStatsCommand* LLStatsCommand::mLLStatsCommandInstance = NULL; // This function implements creation of Vendor command // For LLStats just call base Vendor command create int LLStatsCommand::create() { - int ifindex; int ret = mMsg.create(NL80211_CMD_VENDOR, 0, 0); if (ret < 0) { return ret; @@ -110,7 +109,6 @@ static wifi_error get_wifi_interface_info(wifi_interface_link_layer_info *stats, struct nlattr **tb_vendor) { u32 len = 0; - u8 *data; if (!tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_IFACE_INFO_MODE]) { @@ -686,7 +684,6 @@ static wifi_error get_wifi_radio_stats(wifi_radio_stat *stats, struct nlattr *chInfo; wifi_channel_stat *pChStats; int rem; - wifi_error ret = WIFI_SUCCESS; if (!tb_vendor[QCA_WLAN_VENDOR_ATTR_LL_STATS_RADIO_ID]) { diff --git a/qcwcn/wifi_hal/nan.cpp b/qcwcn/wifi_hal/nan.cpp index 1c7445d..b07a760 100644 --- a/qcwcn/wifi_hal/nan.cpp +++ b/qcwcn/wifi_hal/nan.cpp @@ -41,7 +41,6 @@ wifi_error nan_register_handler(wifi_interface_handle iface, // Obtain the singleton instance int ret = 0; NanCommand *nanCommand = NULL; - interface_info *ifaceInfo = getIfaceInfo(iface); wifi_handle wifiHandle = getWifiHandle(iface); nanCommand = NanCommand::instance(wifiHandle); @@ -53,7 +52,6 @@ wifi_error nan_register_handler(wifi_interface_handle iface, ret = nanCommand->setCallbackHandler(handlers); return (wifi_error)ret; -cleanup: return (wifi_error)ret; } @@ -536,7 +534,6 @@ wifi_error nan_get_sta_parameter(transaction_id id, { int ret = WIFI_ERROR_NOT_SUPPORTED; NanCommand *nanCommand = NULL; - interface_info *ifaceInfo = getIfaceInfo(iface); wifi_handle wifiHandle = getWifiHandle(iface); nanCommand = NanCommand::instance(wifiHandle); diff --git a/qcwcn/wifi_hal/rtt.cpp b/qcwcn/wifi_hal/rtt.cpp index d929c3a..f3ca8e4 100644 --- a/qcwcn/wifi_hal/rtt.cpp +++ b/qcwcn/wifi_hal/rtt.cpp @@ -52,9 +52,6 @@ wifi_error wifi_get_rtt_capabilities(wifi_interface_handle iface, return WIFI_ERROR_INVALID_ARGS; } - interface_info *ifaceInfo = getIfaceInfo(iface); - wifi_handle wifiHandle = getWifiHandle(iface); - if (capabilities == NULL) { ALOGE("wifi_get_rtt_capabilities: NULL capabilities pointer provided." " Exit."); @@ -102,9 +99,6 @@ wifi_error wifi_rtt_range_request(wifi_request_id id, return WIFI_ERROR_INVALID_ARGS; } - interface_info *ifaceInfo = getIfaceInfo(iface); - wifi_handle wifiHandle = getWifiHandle(iface); - if (rtt_config == NULL) { ALOGE("wifi_rtt_range_request: NULL rtt_config pointer provided." " Exit."); @@ -167,9 +161,6 @@ wifi_error wifi_rtt_range_cancel(wifi_request_id id, return WIFI_ERROR_INVALID_ARGS; } - interface_info *ifaceInfo = getIfaceInfo(iface); - wifi_handle wifiHandle = getWifiHandle(iface); - if (addr == NULL) { ALOGE("wifi_rtt_range_cancel: NULL addr pointer provided." " Exit."); @@ -220,9 +211,6 @@ wifi_error wifi_set_lci(wifi_request_id id, wifi_interface_handle iface, return WIFI_ERROR_INVALID_ARGS; } - interface_info *ifaceInfo = getIfaceInfo(iface); - wifi_handle wifiHandle = getWifiHandle(iface); - if (lci == NULL) { ALOGE("%s: NULL lci pointer provided." " Exit.", __FUNCTION__); @@ -267,9 +255,6 @@ wifi_error wifi_set_lcr(wifi_request_id id, wifi_interface_handle iface, return WIFI_ERROR_INVALID_ARGS; } - interface_info *ifaceInfo = getIfaceInfo(iface); - wifi_handle wifiHandle = getWifiHandle(iface); - if (lcr == NULL) { ALOGE("%s: NULL lcr pointer provided." " Exit.", __FUNCTION__); diff --git a/qcwcn/wifi_hal/tdls.cpp b/qcwcn/wifi_hal/tdls.cpp index f42d3ef..a1b0936 100755..100644 --- a/qcwcn/wifi_hal/tdls.cpp +++ b/qcwcn/wifi_hal/tdls.cpp @@ -92,9 +92,6 @@ void TdlsCommand::setSubCmd(u32 subcmd) int TdlsCommand::handleEvent(WifiEvent &event) { ALOGV("Got a TDLS message from Driver"); - unsigned i=0; - u32 status; - int ret = WIFI_SUCCESS; WifiVendorCommand::handleEvent(event); /* Parse the vendordata and get the attribute */ @@ -102,12 +99,10 @@ int TdlsCommand::handleEvent(WifiEvent &event) { case QCA_NL80211_VENDOR_SUBCMD_TDLS_STATE: { - wifi_request_id id; struct nlattr *tb_vendor[QCA_WLAN_VENDOR_ATTR_TDLS_STATE_MAX + 1]; mac_addr addr; wifi_tdls_status status; - int rem; memset(&addr, 0, sizeof(mac_addr)); memset(&status, 0, sizeof(wifi_tdls_status)); @@ -187,18 +182,14 @@ int TdlsCommand::handleEvent(WifiEvent &event) int TdlsCommand::handleResponse(WifiEvent &reply) { - u32 status; - int i = 0; WifiVendorCommand::handleResponse(reply); switch(mSubcmd) { case QCA_NL80211_VENDOR_SUBCMD_TDLS_GET_STATUS: { - wifi_request_id id; struct nlattr *tb_vendor[ QCA_WLAN_VENDOR_ATTR_TDLS_GET_STATUS_MAX + 1]; - int rem; nla_parse(tb_vendor, QCA_WLAN_VENDOR_ATTR_TDLS_GET_STATUS_MAX, (struct nlattr *)mVendorData, mDataLen, NULL); diff --git a/qcwcn/wifi_hal/wifi_hal.cpp b/qcwcn/wifi_hal/wifi_hal.cpp index 49bf2b4..d59d138 100644 --- a/qcwcn/wifi_hal/wifi_hal.cpp +++ b/qcwcn/wifi_hal/wifi_hal.cpp @@ -119,16 +119,6 @@ static nl_sock * wifi_create_nl_socket(int port, int protocol) wifi_socket_set_local_port(sock, port); - struct sockaddr_nl *addr_nl = &(sock->s_local); - /* ALOGI("socket address is %d:%d:%d:%d", - addr_nl->nl_family, addr_nl->nl_pad, addr_nl->nl_pid, - addr_nl->nl_groups); */ - - struct sockaddr *addr = NULL; - // ALOGI("sizeof(sockaddr) = %d, sizeof(sockaddr_nl) = %d", sizeof(*addr), - // sizeof(*addr_nl)); - - // ALOGI("Connecting socket"); if (nl_connect(sock, protocol)) { ALOGE("Could not connect handle"); nl_socket_free(sock); @@ -725,7 +715,6 @@ void wifi_event_loop(wifi_handle handle) /* TODO: Add support for timeouts */ do { - int timeout = -1; /* Infinite timeout */ pfd[0].revents = 0; pfd[1].revents = 0; pfd[2].revents = 0; @@ -858,7 +847,6 @@ public: // ALOGI("handling reponse in %s", __func__); struct nlattr **tb = reply.attributes(); - struct genlmsghdr *gnlh = reply.header(); struct nlattr *mcgrp = NULL; int i; diff --git a/qcwcn/wifi_hal/wificonfig.cpp b/qcwcn/wifi_hal/wificonfig.cpp index c6a6a7c..8a09488 100644 --- a/qcwcn/wifi_hal/wificonfig.cpp +++ b/qcwcn/wifi_hal/wificonfig.cpp @@ -44,7 +44,6 @@ wifi_error wifi_extended_dtim_config_set(wifi_request_id id, struct nlattr *nlData; interface_info *ifaceInfo = getIfaceInfo(iface); wifi_handle wifiHandle = getWifiHandle(iface); - hal_info *info = getHalInfo(wifiHandle); ALOGV("%s: extended_dtim:%d", __FUNCTION__, extended_dtim); @@ -110,10 +109,7 @@ wifi_error wifi_set_country_code(wifi_interface_handle iface, { int requestId, ret = 0; WiFiConfigCommand *wifiConfigCommand; - struct nlattr *nlData; - interface_info *ifaceInfo = getIfaceInfo(iface); wifi_handle wifiHandle = getWifiHandle(iface); - hal_info *info = getHalInfo(wifiHandle); ALOGV("%s: %s", __FUNCTION__, country_code); @@ -168,7 +164,6 @@ wifi_error wifi_set_beacon_wifi_iface_stats_averaging_factor( struct nlattr *nlData; interface_info *ifaceInfo = getIfaceInfo(iface); wifi_handle wifiHandle = getWifiHandle(iface); - hal_info *info = getHalInfo(wifiHandle); ALOGV("%s factor:%u", __FUNCTION__, factor); wifiConfigCommand = new WiFiConfigCommand( @@ -236,7 +231,6 @@ wifi_error wifi_set_guard_time(wifi_request_id id, struct nlattr *nlData; interface_info *ifaceInfo = getIfaceInfo(iface); wifi_handle wifiHandle = getWifiHandle(iface); - hal_info *info = getHalInfo(wifiHandle); ALOGV("%s : guard_time:%u", __FUNCTION__, guard_time); diff --git a/qcwcn/wifi_hal/wifilogger.cpp b/qcwcn/wifi_hal/wifilogger.cpp index 87593bf..78185f5 100644 --- a/qcwcn/wifi_hal/wifilogger.cpp +++ b/qcwcn/wifi_hal/wifilogger.cpp @@ -163,7 +163,6 @@ wifi_error wifi_get_ring_buffers_status(wifi_interface_handle iface, wifi_ring_buffer_status *status) { int ret = 0; - interface_info *ifaceInfo = getIfaceInfo(iface); wifi_handle wifiHandle = getWifiHandle(iface); hal_info *info = getHalInfo(wifiHandle); wifi_ring_buffer_status *rbs; @@ -223,7 +222,6 @@ wifi_error wifi_get_logger_supported_feature_set(wifi_interface_handle iface, struct nlattr *nlData; interface_info *ifaceInfo = getIfaceInfo(iface); wifi_handle wifiHandle = getWifiHandle(iface); - hal_info *info = getHalInfo(wifiHandle); /* No request id from caller, so generate one and pass it on to the driver. * Generate one randomly. @@ -358,7 +356,6 @@ wifi_error wifi_get_firmware_version(wifi_interface_handle iface, struct nlattr *nlData; interface_info *ifaceInfo = getIfaceInfo(iface); wifi_handle wifiHandle = getWifiHandle(iface); - hal_info *info = getHalInfo(wifiHandle); /* No request id from caller, so generate one and pass it on to the driver. * Generate one randomly. @@ -422,7 +419,6 @@ wifi_error wifi_get_driver_version(wifi_interface_handle iface, struct nlattr *nlData; interface_info *ifaceInfo = getIfaceInfo(iface); wifi_handle wifiHandle = getWifiHandle(iface); - hal_info *info = getHalInfo(wifiHandle); /* No request id from caller, so generate one and pass it on to the driver. * Generate one randomly. @@ -485,7 +481,6 @@ wifi_error wifi_get_firmware_memory_dump(wifi_interface_handle iface, struct nlattr *nlData; interface_info *ifaceInfo = getIfaceInfo(iface); wifi_handle wifiHandle = getWifiHandle(iface); - hal_info *info = getHalInfo(wifiHandle); /* No request id from caller, so generate one and pass it on to the driver. * Generate one randomly. @@ -988,9 +983,6 @@ int WifiLoggerCommand::requestResponse() } int WifiLoggerCommand::handleResponse(WifiEvent &reply) { - u32 status; - int ret = WIFI_SUCCESS; - int i = 0; int len = 0, version; char version_type[20]; char* memBuffer = NULL; @@ -1052,7 +1044,6 @@ int WifiLoggerCommand::handleResponse(WifiEvent &reply) { case QCA_NL80211_VENDOR_SUBCMD_WIFI_LOGGER_MEMORY_DUMP: { - int id = 0; u32 memDumpSize = 0; int numRecordsRead = 0; u32 remaining = 0; @@ -1329,7 +1320,6 @@ int WifiLoggerCommand::handleEvent(WifiEvent &event) break; } -cleanup: return NL_SKIP; } @@ -1353,7 +1343,6 @@ void WifiLoggerCommand::unregisterHandler(u32 subCmd) int WifiLoggerCommand::timed_wait(u16 wait_time) { struct timespec absTime; - int res; absTime.tv_sec = wait_time; absTime.tv_nsec = 0; return mCondition.wait(absTime); diff --git a/qcwcn/wifi_hal/wifilogger_diag.cpp b/qcwcn/wifi_hal/wifilogger_diag.cpp index e07b780..88b9c5f 100644 --- a/qcwcn/wifi_hal/wifilogger_diag.cpp +++ b/qcwcn/wifi_hal/wifilogger_diag.cpp @@ -39,6 +39,11 @@ #include "wifilogger_vendor_tag_defs.h" #include "pkt_stats.h" +static uint32_t get_le32(const uint8_t *pos) +{ + return pos[0] | (pos[1] << 8) | (pos[2] << 16) | (pos[3] << 24); +} + #define MAX_CONNECTIVITY_EVENTS 18 // should match the value in wifi_logger.h static event_remap_t events[MAX_CONNECTIVITY_EVENTS] = { {WLAN_PE_DIAG_ASSOC_REQ_EVENT, WIFI_EVENT_ASSOCIATION_REQUESTED}, @@ -1529,7 +1534,6 @@ static wifi_error parse_rx_stats(hal_info *info, u8 *buf, u16 size) static u16 get_tx_mcs(u8 series, struct tx_ppdu_start *ppdu_start) { - u16 tx_rate = 0; MCS mcs; struct series_bw *sbw = NULL; @@ -2189,7 +2193,6 @@ wifi_error diag_message_handler(hal_info *info, nl_msg *msg) } } else if (wnl->nlh.nlmsg_type == ANI_NL_MSG_CNSS_DIAG) { uint16_t diag_fw_type; - uint32_t event_id; buf = (uint8_t *)NLMSG_DATA(wnl); fw_event_hdr_t *event_hdr = @@ -2205,7 +2208,6 @@ wifi_error diag_message_handler(hal_info *info, nl_msg *msg) if (diag_fw_type == DIAG_TYPE_FW_MSG) { dbglog_slot *slot; u16 length = 0; - u32 version = 0; slot = (dbglog_slot *)buf; length = get_le32((u8 *)&slot->length); diff --git a/qcwcn/wifi_hal/wifilogger_diag.h b/qcwcn/wifi_hal/wifilogger_diag.h index ce64b1d..61740c9 100644 --- a/qcwcn/wifi_hal/wifilogger_diag.h +++ b/qcwcn/wifi_hal/wifilogger_diag.h @@ -88,11 +88,6 @@ enum wlan_diag_frame_type { WLAN_DIAG_TYPE_MSG_V2, }; -static uint32_t get_le32(const uint8_t *pos) -{ - return pos[0] | (pos[1] << 8) | (pos[2] << 16) | (pos[3] << 24); -} - typedef struct event_remap { int q_event; int g_event; diff --git a/qcwcn/wpa_supplicant_8_lib/Android.mk b/qcwcn/wpa_supplicant_8_lib/Android.mk index 85d01ca..a573141 100644 --- a/qcwcn/wpa_supplicant_8_lib/Android.mk +++ b/qcwcn/wpa_supplicant_8_lib/Android.mk @@ -57,7 +57,7 @@ endif include $(CLEAR_VARS) LOCAL_MODULE := lib_driver_cmd_qcwcn LOCAL_SHARED_LIBRARIES := libc libcutils -LOCAL_CFLAGS := $(L_CFLAGS) +LOCAL_CFLAGS := $(L_CFLAGS) -Wall LOCAL_SRC_FILES := $(WPA_SRC_FILE) LOCAL_C_INCLUDES := $(WPA_SUPPL_DIR_INCLUDE) include $(BUILD_STATIC_LIBRARY) diff --git a/qcwcn/wpa_supplicant_8_lib/driver_cmd_nl80211.c b/qcwcn/wpa_supplicant_8_lib/driver_cmd_nl80211.c index a82b980..c5d1c93 100644 --- a/qcwcn/wpa_supplicant_8_lib/driver_cmd_nl80211.c +++ b/qcwcn/wpa_supplicant_8_lib/driver_cmd_nl80211.c @@ -26,6 +26,7 @@ #define WPA_PS_ENABLED 0 #define WPA_PS_DISABLED 1 +#define UNUSED(x) (void)(x) /* Return type for setBand*/ @@ -42,15 +43,6 @@ typedef struct android_wifi_priv_cmd { static int drv_errors = 0; -static void wpa_driver_send_hang_msg(struct wpa_driver_nl80211_data *drv) -{ - drv_errors++; - if (drv_errors > DRV_NUMBER_SEQUENTIAL_ERRORS) { - drv_errors = 0; - wpa_msg(drv->ctx, MSG_INFO, WPA_EVENT_DRIVER_STATE "HANGED"); - } -} - static void wpa_driver_notify_country_change(void *ctx, char *cmd) { if ((os_strncasecmp(cmd, "COUNTRY", 7) == 0) || @@ -134,7 +126,7 @@ int wpa_driver_nl80211_driver_cmd(void *priv, char *cmd, char *buf, } } else - wpa_printf(MSG_DEBUG, "%s %s len = %d, %lu", __func__, buf, ret, buf_len); + wpa_printf(MSG_DEBUG, "%s %s len = %d, %zu", __func__, buf, ret, buf_len); wpa_driver_notify_country_change(drv->ctx, cmd); } } @@ -153,6 +145,7 @@ int wpa_driver_set_p2p_noa(void *priv, u8 count, int start, int duration) int wpa_driver_get_p2p_noa(void *priv, u8 *buf, size_t len) { + UNUSED(priv), UNUSED(buf), UNUSED(len); /* Return 0 till we handle p2p_presence request completely in the driver */ return 0; } @@ -171,6 +164,6 @@ int wpa_driver_set_ap_wps_p2p_ie(void *priv, const struct wpabuf *beacon, const struct wpabuf *proberesp, const struct wpabuf *assocresp) { - + UNUSED(priv), UNUSED(beacon), UNUSED(proberesp), UNUSED(assocresp); return 0; } |