mirror of
https://github.com/matrix-construct/construct
synced 2024-09-27 11:18:51 +02:00
ircd: Tweak suggestion output; satisfy several suggestions.
This commit is contained in:
parent
009d417273
commit
a66db65a1d
3 changed files with 7 additions and 2 deletions
|
@ -690,13 +690,14 @@ AM_COND_IF([GCC],
|
|||
CHARYBDIS_C_GCC_TRY_FLAGS([-Wformat-security], charybdis_cv_c_gcc_w_format_security)
|
||||
CHARYBDIS_C_GCC_TRY_FLAGS([-Wstack-usage=$STACK_USAGE_WARNING], charybdis_cv_c_gcc_w_stack_usage)
|
||||
CHARYBDIS_C_GCC_TRY_FLAGS([-Wframe-larger-than=$FRAME_SIZE_WARNING], charybdis_cv_c_gcc_w_frame_larger_than)
|
||||
CHARYBDIS_C_GCC_TRY_FLAGS([-Walloca], charybdis_cv_c_gcc_w_alloca)
|
||||
|
||||
CHARYBDIS_C_GCC_TRY_FLAGS([-Wsuggest-attribute=format], charybdis_cv_c_gcc_w_suggest_attribute_format)
|
||||
CHARYBDIS_C_GCC_TRY_FLAGS([-Wsuggest-attribute=pure], charybdis_cv_c_gcc_w_suggest_attribute_pure)
|
||||
CHARYBDIS_C_GCC_TRY_FLAGS([-Wsuggest-attribute=const], charybdis_cv_c_gcc_w_suggest_attribute_const)
|
||||
CHARYBDIS_C_GCC_TRY_FLAGS([-Wsuggest-attribute=noreturn], charybdis_cv_c_gcc_w_suggest_attribute_noreturn)
|
||||
CHARYBDIS_C_GCC_TRY_FLAGS([-Wsuggest-attribute=malloc], charybdis_cv_c_gcc_w_suggest_attribute_malloc)
|
||||
CHARYBDIS_C_GCC_TRY_FLAGS([-Wsuggest-attribute=cold], charybdis_cv_c_gcc_w_suggest_attribute_cold)
|
||||
dnl CHARYBDIS_C_GCC_TRY_FLAGS([-Wsuggest-attribute=pure], charybdis_cv_c_gcc_w_suggest_attribute_pure)
|
||||
dnl CHARYBDIS_C_GCC_TRY_FLAGS([-Wsuggest-attribute=const], charybdis_cv_c_gcc_w_suggest_attribute_const)
|
||||
],[])
|
||||
|
||||
AM_COND_IF([CLANG],
|
||||
|
|
|
@ -267,6 +267,7 @@ ircd::data(const string_view &str)
|
|||
return str.data();
|
||||
}
|
||||
|
||||
[[gnu::pure]]
|
||||
constexpr size_t
|
||||
ircd::_constexpr_strlen(const char *const s)
|
||||
{
|
||||
|
|
|
@ -27,6 +27,7 @@ inline namespace util
|
|||
|
||||
/// Runtime hashing of a std::u16string (for js). Non-cryptographic.
|
||||
template<size_t PRIME>
|
||||
[[gnu::pure]]
|
||||
size_t
|
||||
ircd::util::hash(const std::u16string &str,
|
||||
const size_t i)
|
||||
|
@ -36,6 +37,7 @@ ircd::util::hash(const std::u16string &str,
|
|||
|
||||
/// Runtime hashing of a string_view. Non-cryptographic.
|
||||
template<size_t PRIME>
|
||||
[[gnu::pure]]
|
||||
constexpr size_t
|
||||
ircd::util::hash(const string_view str,
|
||||
const size_t i)
|
||||
|
@ -45,6 +47,7 @@ ircd::util::hash(const string_view str,
|
|||
|
||||
/// Compile-time hashing of a wider string literal (for js). Non-cryptographic.
|
||||
template<size_t PRIME>
|
||||
[[gnu::pure]]
|
||||
constexpr size_t
|
||||
ircd::util::hash(const char16_t *const str,
|
||||
const size_t i)
|
||||
|
|
Loading…
Reference in a new issue