From fc1885f9feb5a5ddd08cb177f645a90c1219ecd6 Mon Sep 17 00:00:00 2001 From: rexy712 Date: Wed, 2 Oct 2019 08:46:58 -0700 Subject: [PATCH] Fix clang build errors and warnings --- include/matrix/connection.hpp | 4 ++-- include/matrix/upload_info.hpp | 8 ++++---- src/matrix/sync_response.cpp | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/include/matrix/connection.hpp b/include/matrix/connection.hpp index 5725071..e4cf82c 100644 --- a/include/matrix/connection.hpp +++ b/include/matrix/connection.hpp @@ -32,8 +32,8 @@ namespace matrix{ class connection { protected: - mutable raii::curler m_curl; - std::shared_ptr m_ses; + mutable raii::curler m_curl = {}; + std::shared_ptr m_ses = {}; protected: connection(const std::shared_ptr&); connection(const connection&) = default; diff --git a/include/matrix/upload_info.hpp b/include/matrix/upload_info.hpp index 5bf73fd..afa76f3 100644 --- a/include/matrix/upload_info.hpp +++ b/include/matrix/upload_info.hpp @@ -26,7 +26,7 @@ namespace matrix{ - struct client; + class client; struct file_details{ raii::binary data; @@ -45,9 +45,9 @@ namespace matrix{ { friend class matrix::client; protected: - raii::rjp_string m_fileurl; - raii::string m_filename; - raii::string m_mimetype; + raii::rjp_string m_fileurl = {}; + raii::string m_filename = {}; + raii::string m_mimetype = {}; size_t m_filesize = 0; public: diff --git a/src/matrix/sync_response.cpp b/src/matrix/sync_response.cpp index 8734c52..f76cc6a 100644 --- a/src/matrix/sync_response.cpp +++ b/src/matrix/sync_response.cpp @@ -99,10 +99,10 @@ namespace matrix::sync{ RJP_value* response::_find_room_list(const char* segment)const{ RJP_search_res res = rjp_search_member(m_root.get(), "rooms", 0); if(!res.value) - return {nullptr}; + return nullptr; res = rjp_search_member(res.value, segment, 0); if(!res.value) - return {nullptr}; - return {rjp_get_member(res.value)}; + return nullptr; + return rjp_get_member(res.value); } }