From: Juergen Spitzmueller Date: Fri, 20 Oct 2023 07:35:55 +0000 (+0200) Subject: Fix coverity-detected issue CID 403672 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=33da28e5a5020ef4e04bb144b936a910107c3774;p=features.git 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. --- 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;