unicode : silence gcc warnings
ggml-ci
This commit is contained in:
parent
84aef8dfa8
commit
9945478438
1 changed files with 11 additions and 3 deletions
|
@ -7,18 +7,26 @@
|
|||
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <codecvt>
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <locale>
|
||||
#include <map>
|
||||
|
||||
// silence warnings triggered by a gcc bug when using sanitizers
|
||||
// ref: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105562#c21
|
||||
#pragma GCC diagnostic push
|
||||
#if defined __SANITIZE_ADDRESS__ && defined __OPTIMIZE__
|
||||
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
|
||||
#endif
|
||||
#include <regex>
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <unordered_set>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
#include <locale>
|
||||
#include <codecvt>
|
||||
|
||||
size_t unicode_len_utf8(char src) {
|
||||
const size_t lookup[] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 3, 4 };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue