[vte] build: Silence a warning with debug disabled
- From: Egmont Koblinger <egmontkob src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte] build: Silence a warning with debug disabled
- Date: Wed, 18 Sep 2019 13:37:13 +0000 (UTC)
commit b588b33b568f7687967e2e512aa65f8375f25163
Author: Egmont Koblinger <egmont gmail com>
Date: Wed Sep 18 15:34:29 2019 +0200
build: Silence a warning with debug disabled
https://gitlab.gnome.org/GNOME/vte/issues/173
src/vte.cc | 2 ++
1 file changed, 2 insertions(+)
---
diff --git a/src/vte.cc b/src/vte.cc
index 1734d34f..79a59ea6 100644
--- a/src/vte.cc
+++ b/src/vte.cc
@@ -3847,12 +3847,14 @@ Terminal::process_incoming()
case vte::base::UTF8Decoder::ACCEPT: {
auto rv = m_parser.feed(m_utf8_decoder.codepoint());
if (G_UNLIKELY(rv < 0)) {
+#ifdef DEBUG
uint32_t c = m_utf8_decoder.codepoint();
char c_buf[7];
g_snprintf(c_buf, sizeof(c_buf), "%lc", c);
char const* wp_str = g_unichar_isprint(c) ? c_buf :
_vte_debug_sequence_to_string(c_buf, -1);
_vte_debug_print(VTE_DEBUG_PARSER, "Parser error on U+%04X [%s]!\n",
c, wp_str);
+#endif
break;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]