From e6fa3ce2dfd45ef3556b31b8f51c88a78c4e4ce4 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Fri, 2 Aug 2019 09:27:52 +0200 Subject: [PATCH] shared: explicitly ignore return value of g_utf8_validate() Coverity doesn't like us ignoring the return value, although we really only care about the "p" output pointer. Try casting the result to (void), maybe that silences Coverity. --- shared/nm-glib-aux/nm-shared-utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared/nm-glib-aux/nm-shared-utils.c b/shared/nm-glib-aux/nm-shared-utils.c index c8a253a668..b2ec547092 100644 --- a/shared/nm-glib-aux/nm-shared-utils.c +++ b/shared/nm-glib-aux/nm-shared-utils.c @@ -1939,7 +1939,7 @@ nm_utils_buf_utf8safe_escape (gconstpointer buf, gssize buflen, NMUtilsStrUtf8Sa break; s = &p[1]; - g_utf8_validate (s, buflen, &p); + (void) g_utf8_validate (s, buflen, &p); } while (TRUE); *to_free = g_string_free (gstr, FALSE);