From 0115723c0d925e87685ec2764abebd30729c5bdd Mon Sep 17 00:00:00 2001 From: cmuhammedrafi Date: Wed, 28 Aug 2024 10:04:17 +0530 Subject: [PATCH] warning all waring error fix --- .vscode/settings.json | 61 +++++++++++++++++++++++++++++++++++ NetworkManagerRDKProxy.cpp | 4 +-- NetworkManagerStunClient.cpp | 4 +-- WiFiSignalStrengthMonitor.cpp | 1 - 4 files changed, 64 insertions(+), 6 deletions(-) create mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..b1f53e15 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,61 @@ +{ + "files.associations": { + "chrono": "cpp", + "array": "cpp", + "atomic": "cpp", + "bit": "cpp", + "*.tcc": "cpp", + "cctype": "cpp", + "clocale": "cpp", + "cmath": "cpp", + "compare": "cpp", + "concepts": "cpp", + "condition_variable": "cpp", + "cstdarg": "cpp", + "cstddef": "cpp", + "cstdint": "cpp", + "cstdio": "cpp", + "cstdlib": "cpp", + "cstring": "cpp", + "ctime": "cpp", + "cwchar": "cpp", + "cwctype": "cpp", + "deque": "cpp", + "map": "cpp", + "set": "cpp", + "string": "cpp", + "unordered_map": "cpp", + "vector": "cpp", + "exception": "cpp", + "algorithm": "cpp", + "functional": "cpp", + "iterator": "cpp", + "memory": "cpp", + "memory_resource": "cpp", + "numeric": "cpp", + "random": "cpp", + "ratio": "cpp", + "string_view": "cpp", + "system_error": "cpp", + "tuple": "cpp", + "type_traits": "cpp", + "utility": "cpp", + "fstream": "cpp", + "initializer_list": "cpp", + "iosfwd": "cpp", + "iostream": "cpp", + "istream": "cpp", + "limits": "cpp", + "mutex": "cpp", + "new": "cpp", + "numbers": "cpp", + "ostream": "cpp", + "semaphore": "cpp", + "sstream": "cpp", + "stdexcept": "cpp", + "stop_token": "cpp", + "streambuf": "cpp", + "thread": "cpp", + "typeinfo": "cpp" + } +} \ No newline at end of file diff --git a/NetworkManagerRDKProxy.cpp b/NetworkManagerRDKProxy.cpp index 32316f39..d8bce80e 100644 --- a/NetworkManagerRDKProxy.cpp +++ b/NetworkManagerRDKProxy.cpp @@ -538,7 +538,6 @@ namespace WPEFramework } void NetworkManagerImplementation::threadEventRegistration() { - IARM_Result_t res = IARM_RESULT_SUCCESS; IARM_Result_t retVal = IARM_RESULT_SUCCESS; do { @@ -1216,7 +1215,7 @@ const string CIDR_PREFIXES[CIDR_NETMASK_IP_LEN] = { if (!signalStrength.empty()) { signalStrengthOut = std::stof(signalStrength.c_str()); - NMLOG_INFO ("WiFiSignalStrength in dB = %s",signalStrengthOut); + NMLOG_INFO ("WiFiSignalStrength in dB = %f",signalStrengthOut); } if (signalStrengthOut == 0) @@ -1311,7 +1310,6 @@ const string CIDR_PREFIXES[CIDR_NETMASK_IP_LEN] = { { LOG_ENTRY_FUNCTION(); uint32_t rc = Core::ERROR_RPC_CALL_FAILED; - IARM_Result_t retVal = IARM_RESULT_SUCCESS; IARM_Bus_WiFiSrvMgr_Param_t param; memset(¶m, 0, sizeof(param)); diff --git a/NetworkManagerStunClient.cpp b/NetworkManagerStunClient.cpp index 999f14e8..263cff01 100644 --- a/NetworkManagerStunClient.cpp +++ b/NetworkManagerStunClient.cpp @@ -360,7 +360,7 @@ bool client::bind( auto time_in_cache = std::chrono::duration_cast( std::chrono::steady_clock::now() - m_last_cache_time); - verbose("client::bind cache time=%lld\n", time_in_cache.count()); + verbose("client::bind cache time=%ld\n", time_in_cache.count()); if(time_in_cache.count() < m_cache_timeout) { @@ -672,7 +672,7 @@ std::unique_ptr client::send_binding_request(std::chrono::milliseconds std::unique_ptr client::send_binding_request(sockaddr_storage const & addr, std::chrono::milliseconds wait_time) { - this->verbose("sending binding request with wait time:%lld ms\n", wait_time.count()); + this->verbose("sending binding request with wait time:%ld ms\n", wait_time.count()); this->create_udp_socket(addr.ss_family); std::unique_ptr binding_request(message_factory::create_binding_request()); std::unique_ptr binding_response(this->send_message(addr, *binding_request, wait_time)); diff --git a/WiFiSignalStrengthMonitor.cpp b/WiFiSignalStrengthMonitor.cpp index 0230095b..0461ff4d 100644 --- a/WiFiSignalStrengthMonitor.cpp +++ b/WiFiSignalStrengthMonitor.cpp @@ -99,7 +99,6 @@ namespace WPEFramework isRunning = true; monitorThread = std::thread(&WiFiSignalStrengthMonitor::monitorThreadFunction, this, interval); monitorThread.detach(); - std::thread::id threadId = monitorThread.get_id(); NMLOG_INFO("Thread started with interval: %d seconds", interval); }