aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorMarco Varlese <marco.varlese@suse.com>2018-06-27 09:54:44 +0200
committerDave Barach <openvpp@barachs.net>2018-06-27 15:29:47 +0000
commit99d7a72cbcad959e805e8e8b5efb112e9def69c2 (patch)
tree1fac922965f751f13e6fcfddf8a1e93c768c6dfd /src/plugins
parentc5ee4fd4aa1f873e5448df3395a178b44e3d55f8 (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>
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);