aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorMarco Varlese <marco.varlese@suse.com>2018-06-27 09:54:44 +0200
committerChris Luke <chris_luke@comcast.com>2018-07-09 12:28:30 +0000
commitca7a68e0fba9de14e18801c535d87da7fa0e4fa3 (patch)
tree82a017053a7500ab9a886310dc2014b5a0055a50 /src/plugins
parent6bb589c8acc4e3c27bcbd84d9fcd98ba0777db36 (diff)
gcc8 and Wstringop-truncation
gcc8 introduced a new warning (Wstringop-truncation) which in our case is being treated as error. Disabling the warning globally might introduce bugs related to string truncation which are not desired by the developer (e.g. bug). Instead, this patch disables the warning only for those occurences which have been verified to be non-bugs but the desired behaviour as per developer will. Change-Id: I0f04ff6b4fad44061e80a65af633fd7e0148a0c5 Signed-off-by: Marco Varlese <marco.varlese@suse.com> (cherry picked from commit 99d7a72cbcad959e805e8e8b5efb112e9def69c2)
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/memif/memif_api.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/memif/memif_api.c b/src/plugins/memif/memif_api.c
index 6cb48a8f72d..a4137e48006 100644
--- a/src/plugins/memif/memif_api.c
+++ b/src/plugins/memif/memif_api.c
@@ -130,7 +130,7 @@ void
if (len > 0)
{
vec_validate (socket_filename, len);
- strncpy ((char *) socket_filename, (char *) mp->socket_filename, len);
+ memcpy (socket_filename, mp->socket_filename, len);
}
rv = memif_socket_filename_add_del (is_add, socket_id, socket_filename);