From 465d28e160700580c31078f0c5548c3622d5b1ec Mon Sep 17 00:00:00 2001 From: Nuno Lopes Date: Tue, 5 Jan 2016 14:57:41 +0000 Subject: [PATCH] seq_decl: fix build with stricter compilers get rid of 32 rellocations as a nice side-effect --- src/ast/seq_decl_plugin.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ast/seq_decl_plugin.cpp b/src/ast/seq_decl_plugin.cpp index 44901b506..9c8a085e8 100644 --- a/src/ast/seq_decl_plugin.cpp +++ b/src/ast/seq_decl_plugin.cpp @@ -80,8 +80,9 @@ zstring zstring::replace(zstring const& src, zstring const& dst) const { return result; } -static char* esc_table[32] = { "\\0", "^A", "^B", "^C", "^D", "^E", "^F", "\\a", "\\b", "\\t", "\\n", "\\v", "\\f", "\\r", "^N", - "^O", "^P", "^Q", "^R", "^S", "^T", "^U", "^V","^W","^X","^Y","^Z","\\e","^\\","^]","^^","^_"}; +static const char esc_table[32][3] = + { "\\0", "^A", "^B", "^C", "^D", "^E", "^F", "\\a", "\\b", "\\t", "\\n", "\\v", "\\f", "\\r", "^N", + "^O", "^P", "^Q", "^R", "^S", "^T", "^U", "^V","^W","^X","^Y","^Z","\\e","^\\","^]","^^","^_"}; std::string zstring::encode() const { SASSERT(m_encoding == ascii);