[9610] wlbt: Fix warnings for ERD 9610 Android P Project.
authorTarun Karela <t.karela@samsung.com>
Mon, 9 Jul 2018 10:45:20 +0000 (11:45 +0100)
committerhskang <hs1218.kang@samsung.com>
Mon, 6 Aug 2018 22:29:28 +0000 (18:29 -0400)
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)

common.cpp
gscan.cpp
link_layer_stats.cpp
roam.cpp
wifi_hal.cpp
wifi_logger.cpp

index b28a815076b0c06c6e389017245232460e0f813f..e0de0bc184ab584d24891bc5869e4be05628d30c 100755 (executable)
@@ -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);
index 063ac557d54d9ac791289c34bf1e812d6074d757..0b77503a12b1aefc26f50310ab8b14732937893d 100755 (executable)
--- a/gscan.cpp
+++ b/gscan.cpp
@@ -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);
index cafabb6bc54df13bfa8973c02ca2b882da8ea3d9..bfdeac8c86621610ed05564c8acd2698d94a3f30 100755 (executable)
@@ -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]);
index 2f5e8a1b0a7af46f6a324040333ef4bf8ac5139d..2fe5c26421778e5d0ab8eca8ad2ef5cca40a5cbe 100755 (executable)
--- a/roam.cpp
+++ b/roam.cpp
@@ -106,7 +106,6 @@ wifi_error wifi_configure_roaming(wifi_interface_handle iface, wifi_roaming_conf
     wifi_error ret;\r
     int requestId;\r
     wifi_bssid_params bssid_params;\r
-    wifi_handle wifiHandle = getWifiHandle(iface);\r
 \r
     if (!roaming_config) {\r
         ALOGE("%s: Invalid Buffer provided. Exit", __FUNCTION__);\r
index 402c244f7d17f660c9612fead171e65c71db7067..b38d333d2a82665325fd5f4aaab53b5ade5bf074 100755 (executable)
@@ -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);
index 03ed87fd370e3c6c6228a5f7d5388baa0c44089f..0d8eed2eef5109e5f4d0b73394c862ee09e0c089 100755 (executable)
@@ -380,9 +380,8 @@ public:
             case GET_FEATURE:\r
             {\r
                 void *data = reply.get_vendor_data();\r
-                int len = reply.get_vendor_data_len();\r
 \r
-                ALOGD("len = %d, expected len = %d", len, sizeof(unsigned int));\r
+                ALOGD("len = %d, expected len = %lu", reply.get_vendor_data_len(), (unsigned long)sizeof(unsigned int));\r
                 memcpy(mSupport, data, sizeof(unsigned int));\r
                 break;\r
             }\r
@@ -677,7 +676,6 @@ public:
     }\r
 \r
     virtual int handleEvent(WifiEvent& event) {\r
-        wifi_ring_buffer_id ring_id;\r
         char *buffer = NULL;\r
         int buffer_size = 0;\r
 \r
@@ -944,7 +942,7 @@ public:
         for (nl_iterator it(vendor_data); it.has_next(); it.next()) {\r
             if (it.get_type() == ENHANCE_LOGGER_ATTRIBUTE_PKT_FATE_NUM) {\r
                 *mNoProvidedFates = it.get_u32();\r
-                ALOGI("No: of pkt fates provided is %d\n", *mNoProvidedFates);\r
+                ALOGI("No: of pkt fates provided is %zu\n", *mNoProvidedFates);\r
             } else {\r
                 ALOGE("Ignoring invalid attribute type = %d, size = %d\n",\r
                         it.get_type(), it.get_len());\r
@@ -1174,6 +1172,16 @@ public:
                            it.get_type(), it.get_len());\r
                      }\r
                  }\r
+           case GET_FW_VER:\r
+            case GET_DRV_VER:\r
+            case GET_RING_DATA:\r
+            case GET_RING_STATUS:\r
+            case GET_FEATURE:\r
+            case START_RING_LOG:\r
+            default:\r
+                   {\r
+                          ALOGW("Ignoring GetCmdType %d \n", mType);\r
+                   }\r
             }\r
         return NL_OK;\r
     }\r