summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDongsun Lee <ds73.lee@samsung.com>2020-01-15 16:07:06 +0900
committerDongsun Lee <ds73.lee@samsung.com>2020-01-15 16:07:06 +0900
commit9a14623f4506cd3bbe6ad87b8be252c281c33209 (patch)
tree73623962df29b43cb03e9faad44f4194d136067f
parentb3b9ae9171e47e03983d591bd24288fde4d6347a (diff)
downloadcert-checker-accepted/tizen/unified/20200116.112257.tar.gz
cert-checker-accepted/tizen/unified/20200116.112257.tar.bz2
cert-checker-accepted/tizen/unified/20200116.112257.zip
Fix build failures with new toolchain(gcc 9)submit/tizen/20200116.002215accepted/tizen/unified/20200116.112257
Change-Id: I1df2b3d4776655f6f3331df20995e33748a0242a Signed-off-by: Dongsun Lee <ds73.lee@samsung.com>
-rw-r--r--src/common/socket.cpp4
-rw-r--r--src/dpl/core/src/assert.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/common/socket.cpp b/src/common/socket.cpp
index a30d605..4ab49bf 100644
--- a/src/common/socket.cpp
+++ b/src/common/socket.cpp
@@ -122,9 +122,9 @@ Socket Socket::connect(const std::string &path)
std::error_code(errno, std::generic_category()),
"socket create failed!");
- sockaddr_un addr;
+ sockaddr_un addr = {};
addr.sun_family = AF_UNIX;
- strncpy(addr.sun_path, path.c_str(), sizeof(addr.sun_path));
+ strncpy(addr.sun_path, path.c_str(), sizeof(addr.sun_path) - 1);
if (::connect(fd, reinterpret_cast<sockaddr *>(&addr),
sizeof(sockaddr_un)) == -1)
diff --git a/src/dpl/core/src/assert.cpp b/src/dpl/core/src/assert.cpp
index acaa958..489beaa 100644
--- a/src/dpl/core/src/assert.cpp
+++ b/src/dpl/core/src/assert.cpp
@@ -56,7 +56,7 @@ void AssertProc(const char *condition,
INTERNAL_LOG("### Function: " << function);
INTERNAL_LOG(
"################################################################################");
- } catch (Exception) {
+ } catch (Exception&) {
// Just ignore possible double errors
}