diff --git a/src/Type.cc b/src/Type.cc index 43f5da6267..6a4139bc8b 100644 --- a/src/Type.cc +++ b/src/Type.cc @@ -19,7 +19,7 @@ BroType::TypeAliasMap BroType::type_aliases; // Note: This function must be thread-safe. const char* type_name(TypeTag t) { - static const char* type_names[int(NUM_TYPES)] = { + static constexpr const char* type_names[int(NUM_TYPES)] = { "void", // 0 "bool", // 1 "int", // 2 diff --git a/src/util.cc b/src/util.cc index 18999aa903..cbd635d5a2 100644 --- a/src/util.cc +++ b/src/util.cc @@ -612,7 +612,7 @@ TEST_CASE("util uitoa_n") char* uitoa_n(uint64_t value, char* str, int n, int base, const char* prefix) { - static char dig[] = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; + static constexpr char dig[] = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; assert(n);