Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions include/webcpp/crypto/backends/bearssl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@
WEBCPP_CRYPTO_DETAIL_BEARSSL_CONFIGURATION))
#endif

// src/canary_bearssl.c defines the canary with a constant; this is its declaration.
// NOLINTNEXTLINE(bugprone-dynamic-static-initializers): a declaration, never initialised here
extern "C" const char WEBCPP_CRYPTO_DETAIL_BEARSSL_CANARY;
// src/canary_bearssl.c defines the canary with a constant, so its initialisation is static, never
// dynamic; constinit, on this declaration, states it.
extern "C" constinit const char WEBCPP_CRYPTO_DETAIL_BEARSSL_CANARY;

namespace webcpp::crypto::backends {

Expand Down
6 changes: 3 additions & 3 deletions include/webcpp/crypto/backends/ctaes.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ extern "C" {
WEBCPP_CRYPTO_DETAIL_CTAES_CONFIGURATION))
#endif

// src/canary_ctaes.c defines the canary with a constant; this is its declaration.
// NOLINTNEXTLINE(bugprone-dynamic-static-initializers): a declaration, never initialised here
extern "C" const char WEBCPP_CRYPTO_DETAIL_CTAES_CANARY;
// src/canary_ctaes.c defines the canary with a constant, so its initialisation is static, never
// dynamic; constinit, on this declaration, states it.
extern "C" constinit const char WEBCPP_CRYPTO_DETAIL_CTAES_CANARY;

namespace webcpp::crypto::backends {

Expand Down
6 changes: 3 additions & 3 deletions include/webcpp/crypto/backends/secp256k1.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@
WEBCPP_CRYPTO_DETAIL_SECP256K1_CONFIGURATION))
#endif

// src/canary_secp256k1.c defines the canary with a constant; this is its declaration.
// NOLINTNEXTLINE(bugprone-dynamic-static-initializers): a declaration, never initialised here
extern "C" const char WEBCPP_CRYPTO_DETAIL_SECP256K1_CANARY;
// src/canary_secp256k1.c defines the canary with a constant, so its initialisation is static, never
// dynamic; constinit, on this declaration, states it.
extern "C" constinit const char WEBCPP_CRYPTO_DETAIL_SECP256K1_CANARY;

namespace webcpp::crypto::backends {

Expand Down
6 changes: 3 additions & 3 deletions include/webcpp/crypto/backends/sodium.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@
WEBCPP_CRYPTO_DETAIL_MISMATCH_VALUE(sodium, WEBCPP_CRYPTO_SODIUM_COMMIT, portable))
#endif

// src/canary_sodium.c defines the canary with a constant; this is its declaration.
// NOLINTNEXTLINE(bugprone-dynamic-static-initializers): a declaration, never initialised here
extern "C" const char WEBCPP_CRYPTO_DETAIL_SODIUM_CANARY;
// src/canary_sodium.c defines the canary with a constant, so its initialisation is static, never
// dynamic; constinit, on this declaration, states it.
extern "C" constinit const char WEBCPP_CRYPTO_DETAIL_SODIUM_CANARY;

namespace webcpp::crypto::backends {

Expand Down
5 changes: 3 additions & 2 deletions test/msvc/canary_secp256k1_two_files/other.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@
#include <cstdint>

// The canary of the configuration above, which the large tables' archive does not define. The
// header declared it, so this definition has external linkage.
extern "C" const char WEBCPP_CRYPTO_DETAIL_SECP256K1_CANARY = 0;
// header declared it, so this definition has external linkage; it declared it constinit, which
// its initialising declaration repeats.
extern "C" constinit const char WEBCPP_CRYPTO_DETAIL_SECP256K1_CANARY = 0;

bool sign_other() {
std::array<std::uint8_t, 32> secret{};
Expand Down
5 changes: 3 additions & 2 deletions test/msvc/canary_two_files/other.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@
#include <cstdint>

// The canary of the configuration above, which no archive defines (the archive of MSVC's BearSSL
// is built noseeder). The header declared it, so this definition has external linkage.
extern "C" const char WEBCPP_CRYPTO_DETAIL_BEARSSL_CANARY = 0;
// is built noseeder). The header declared it, so this definition has external linkage; it
// declared it constinit, which its initialising declaration repeats.
extern "C" constinit const char WEBCPP_CRYPTO_DETAIL_BEARSSL_CANARY = 0;

bool seal_other() {
std::array<std::uint8_t, 32> const key{};
Expand Down
Loading