From 15caf5082cc821445788e505d85352792091655c Mon Sep 17 00:00:00 2001 From: Hermet Park Date: Mon, 9 Aug 2021 21:21:01 +0900 Subject: [PATCH] --annoying compiler warnings. --- src/lib/tvgInitializer.cpp | 6 +++--- src/loaders/tvg/tvgTvgBinInterpreter.cpp | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/lib/tvgInitializer.cpp b/src/lib/tvgInitializer.cpp index 2bd1e87..eb57d5a 100644 --- a/src/lib/tvgInitializer.cpp +++ b/src/lib/tvgInitializer.cpp @@ -49,20 +49,20 @@ static bool _buildVersionInfo() char major[3]; x = strchr(p, '.'); if (!x) return false; - strncpy(major, p, x - p); + memcpy(major, p, x - p); major[x - p] = '\0'; p = x + 1; char minor[3]; x = strchr(p, '.'); if (!x) return false; - strncpy(minor, p, x - p); + memcpy(minor, p, x - p); minor[x - p] = '\0'; p = x + 1; char micro[3]; x = SRC + strlen(THORVG_VERSION_STRING); - strncpy(micro, p, x - p); + memcpy(micro, p, x - p); micro[x - p] = '\0'; char sum[7]; diff --git a/src/loaders/tvg/tvgTvgBinInterpreter.cpp b/src/loaders/tvg/tvgTvgBinInterpreter.cpp index 9c16ecd..b549e9a 100644 --- a/src/loaders/tvg/tvgTvgBinInterpreter.cpp +++ b/src/loaders/tvg/tvgTvgBinInterpreter.cpp @@ -476,5 +476,5 @@ unique_ptr TvgBinInterpreter::run(const char *ptr, const char* end) ptr = block.end; } - return move(scene); -} \ No newline at end of file + return scene; +} -- 2.7.4