diff options
| author | Tarun Karela <t.karela@samsung.com> | 2018-07-09 11:45:20 +0100 |
|---|---|---|
| committer | hskang <hs1218.kang@samsung.com> | 2018-08-06 18:29:28 -0400 |
| commit | 8094868d12ad893edcd139716e48314a8ed7e268 (patch) | |
| tree | 80924d00ff4cc81a5ce8a878a1731070f4c358bc | |
| parent | d3a587e8a37b205b04b4566053b94ec5a5358fe3 (diff) | |
[9610] wlbt: Fix warnings for ERD 9610 Android P Project.
Stricter compilation seems to be on in MCD manifest for Android P so
fixing these for wifi hal project.
Change-Id: Ie63e5db6298d4e4a82764acd49fed2ebab45195a
SCSC-Bug-Id: SSB-41717
Signed-off-by: Tarun Karela <t.karela@samsung.com>
(cherry picked from commit 254df287a97fde15dfed8cfe487d87521f444e0d)
| -rwxr-xr-x | common.cpp | 1 | ||||
| -rwxr-xr-x | gscan.cpp | 20 | ||||
| -rwxr-xr-x | link_layer_stats.cpp | 2 | ||||
| -rwxr-xr-x | roam.cpp | 1 | ||||
| -rwxr-xr-x | wifi_hal.cpp | 5 | ||||
| -rwxr-xr-x | wifi_logger.cpp | 16 |
6 files changed, 16 insertions, 29 deletions
@@ -220,7 +220,6 @@ void wifi_unregister_cmd(wifi_handle handle, WifiCommand *cmd) for (int i = 0; i < info->num_cmd; i++) { if (info->cmd[i].cmd == cmd) { - int id = info->cmd[i].id; memmove(&info->cmd[i], &info->cmd[i+1], (info->num_cmd - i) * sizeof(cmd_info)); info->num_cmd--; //ALOGI("Successfully removed command %d: %p from %d", id, cmd, i); @@ -1,4 +1,3 @@ - #include <stdint.h> #include <stddef.h> #include <fcntl.h> @@ -81,9 +80,6 @@ protected: return NL_SKIP; } - int id = reply.get_vendor_id(); - int subcmd = reply.get_vendor_subcmd(); - void *data = reply.get_vendor_data(); int len = reply.get_vendor_data_len(); @@ -140,8 +136,6 @@ protected: return NL_SKIP; } - int id = reply.get_vendor_id(); - int subcmd = reply.get_vendor_subcmd(); int num_channels_to_copy = 0; nlattr *vendor_data = reply.get_attribute(NL80211_ATTR_VENDOR_DATA); @@ -182,6 +176,7 @@ wifi_error wifi_get_valid_channels(wifi_interface_handle handle, /* helper functions */ +/* static int parseScanResults(wifi_scan_result *results, int num, nlattr *attr) { memset(results, 0, sizeof(wifi_scan_result) * num); @@ -189,7 +184,6 @@ static int parseScanResults(wifi_scan_result *results, int num, nlattr *attr) int i = 0; for (nl_iterator it(attr); it.has_next() && i < num; it.next(), i++) { - int index = it.get_type(); nlattr *sc_data = (nlattr *) it.get_data(); wifi_scan_result *result = results + i; @@ -221,6 +215,7 @@ static int parseScanResults(wifi_scan_result *results, int num, nlattr *attr) return i; } +*/ int createFeatureRequest(WifiRequest& request, int subcmd) { @@ -237,12 +232,10 @@ class ScanCommand : public WifiCommand wifi_scan_cmd_params *mParams; wifi_scan_result_handler mHandler; static unsigned mGlobalFullScanBuckets; - bool mLocalFullScanBuckets; public: ScanCommand(wifi_interface_handle iface, int id, wifi_scan_cmd_params *params, wifi_scan_result_handler handler) - : WifiCommand(iface, id), mParams(params), mHandler(handler), - mLocalFullScanBuckets(0) + : WifiCommand(iface, id), mParams(params), mHandler(handler) { } int createSetupRequest(WifiRequest& request) { @@ -479,7 +472,6 @@ wifi_error wifi_stop_gscan(wifi_request_id id, wifi_interface_handle iface) if(id == -1) { wifi_scan_result_handler handler; wifi_scan_cmd_params dummy_params; - wifi_handle handle = getWifiHandle(iface); memset(&handler, 0, sizeof(handler)); ScanCommand *cmd = new ScanCommand(iface, id, &dummy_params, handler); @@ -574,9 +566,6 @@ public: return NL_SKIP; } - int id = reply.get_vendor_id(); - int subcmd = reply.get_vendor_subcmd(); - nlattr *vendor_data = reply.get_attribute(NL80211_ATTR_VENDOR_DATA); int len = reply.get_vendor_data_len(); @@ -611,8 +600,8 @@ public: num = min((int)MAX_AP_CACHE_PER_SCAN, num); memcpy(mScanResults + mNextScanResult, it2.get_data(), sizeof(wifi_scan_result) * num); - wifi_scan_result *results = (wifi_scan_result *)it2.get_data(); /* + wifi_scan_result *results = (wifi_scan_result *)it2.get_data(); for (int i = 0; i < num; i++) { wifi_scan_result *result = results + i; ALOGD("%02d %-32s %02x:%02x:%02x:%02x:%02x:%02x %04d", i, @@ -1148,7 +1137,6 @@ public: } virtual int handleEvent(WifiEvent& event) { - int event_id = event.get_vendor_subcmd(); // event.log(); nlattr *vendor_data = event.get_attribute(NL80211_ATTR_VENDOR_DATA); diff --git a/link_layer_stats.cpp b/link_layer_stats.cpp index cafabb6..bfdeac8 100755 --- a/link_layer_stats.cpp +++ b/link_layer_stats.cpp @@ -199,9 +199,7 @@ protected: return NL_SKIP; } int id = reply.get_vendor_id(); - int subcmd = reply.get_vendor_subcmd(); u8 *data = (u8 *)reply.get_vendor_data(); - int len = reply.get_vendor_data_len(); int num_radios = 0, i = 0; num_radios = data[0]; data += sizeof(data[0]); @@ -106,7 +106,6 @@ wifi_error wifi_configure_roaming(wifi_interface_handle iface, wifi_roaming_conf wifi_error ret;
int requestId;
wifi_bssid_params bssid_params;
- wifi_handle wifiHandle = getWifiHandle(iface);
if (!roaming_config) {
ALOGE("%s: Invalid Buffer provided. Exit", __FUNCTION__);
diff --git a/wifi_hal.cpp b/wifi_hal.cpp index 402c244..b38d333 100755 --- a/wifi_hal.cpp +++ b/wifi_hal.cpp @@ -41,7 +41,6 @@ #define ATTR_NODFS_VALUE 3 #define ATTR_COUNTRY_CODE 4 -static void internal_event_handler(wifi_handle handle, int events); static int internal_no_seq_check(nl_msg *msg, void *arg); static int internal_valid_message_handler(nl_msg *msg, void *arg); static int wifi_get_multicast_id(wifi_handle handle, const char *name, const char *group); @@ -840,9 +839,6 @@ public: protected: virtual int handleResponse(WifiEvent& reply) { - int id = reply.get_vendor_id(); - int subcmd = reply.get_vendor_subcmd(); - if (reply.get_cmd() != NL80211_CMD_VENDOR) { ALOGD("Ignore reply; cmd = %d", reply.get_cmd()); return NL_SKIP; @@ -1004,7 +1000,6 @@ static wifi_error wifi_stop_rssi_monitoring(wifi_request_id id, wifi_interface_h if(id == -1) { wifi_rssi_event_handler handler; - wifi_handle handle = getWifiHandle(iface); memset(&handler, 0, sizeof(handler)); SetRSSIMonitorCommand *cmd = new SetRSSIMonitorCommand(id, iface, 0, 0, handler); diff --git a/wifi_logger.cpp b/wifi_logger.cpp index 03ed87f..0d8eed2 100755 --- a/wifi_logger.cpp +++ b/wifi_logger.cpp @@ -380,9 +380,8 @@ public: case GET_FEATURE:
{
void *data = reply.get_vendor_data();
- int len = reply.get_vendor_data_len();
- ALOGD("len = %d, expected len = %d", len, sizeof(unsigned int));
+ ALOGD("len = %d, expected len = %lu", reply.get_vendor_data_len(), (unsigned long)sizeof(unsigned int));
memcpy(mSupport, data, sizeof(unsigned int));
break;
}
@@ -677,7 +676,6 @@ public: }
virtual int handleEvent(WifiEvent& event) {
- wifi_ring_buffer_id ring_id;
char *buffer = NULL;
int buffer_size = 0;
@@ -944,7 +942,7 @@ public: for (nl_iterator it(vendor_data); it.has_next(); it.next()) {
if (it.get_type() == ENHANCE_LOGGER_ATTRIBUTE_PKT_FATE_NUM) {
*mNoProvidedFates = it.get_u32();
- ALOGI("No: of pkt fates provided is %d\n", *mNoProvidedFates);
+ ALOGI("No: of pkt fates provided is %zu\n", *mNoProvidedFates);
} else {
ALOGE("Ignoring invalid attribute type = %d, size = %d\n",
it.get_type(), it.get_len());
@@ -1174,6 +1172,16 @@ public: it.get_type(), it.get_len());
}
}
+ case GET_FW_VER:
+ case GET_DRV_VER:
+ case GET_RING_DATA:
+ case GET_RING_STATUS:
+ case GET_FEATURE:
+ case START_RING_LOG:
+ default:
+ {
+ ALOGW("Ignoring GetCmdType %d \n", mType);
+ }
}
return NL_OK;
}
|
