From 33da28e5a5020ef4e04bb144b936a910107c3774 Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Fri, 20 Oct 2023 09:35:55 +0200 Subject: [PATCH] Fix coverity-detected issue CID 403672 Error handling issues (CHECKED_RETURN) Calling "translateString" without checking return value (as is done elsewhere 15 out of 18 times). AFAICS we do not need the boolean return value in these two cases. --- src/insets/InsetInfo.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/insets/InsetInfo.cpp b/src/insets/InsetInfo.cpp index 1cb6853a24..3048456e84 100644 --- a/src/insets/InsetInfo.cpp +++ b/src/insets/InsetInfo.cpp @@ -1506,7 +1506,7 @@ void docbookShortcutInfo(XMLStream & xs, const InsetInfoParams & params) { for (char_type const c : sequence) { const auto keyMapping = keyToString.find(c); if (keyMapping != keyToString.end()) { - translateString(from_ascii(keyMapping->second), trans, lcode); + (void) translateString(from_ascii(keyMapping->second), trans, lcode); // db:keysym: symbolic name (like Page Up), unlike what is printed on the key (like // ⇞, ↑, ▲, PgUp, Page Up, etc.) @@ -1584,7 +1584,7 @@ void xhtmlShortcutInfo(XMLStream & xs, const InsetInfoParams & params) { char_type const c = sequence[i]; const auto keyMapping = keyToString.find(c); if (keyMapping != keyToString.end()) { - translateString(from_ascii(keyMapping->second), trans, lcode); + (void) translateString(from_ascii(keyMapping->second), trans, lcode); xs << trans; } else { xs << c;