diff --git a/src/crypto/error.cpp b/src/crypto/error.cpp index 1765ca5..d4a3d45 100644 --- a/src/crypto/error.cpp +++ b/src/crypto/error.cpp @@ -29,7 +29,7 @@ namespace essence::crypto { namespace { - ES_KEEP_ALIVE [[maybe_unused]] const scope_exit crypto_error_strings_scope{ + [[maybe_unused]] ES_KEEP_ALIVE const scope_exit crypto_error_strings_scope{ [] { ERR_load_crypto_strings(); }, [] { ERR_free_strings(); }}; } // namespace diff --git a/src/dllmain.cpp b/src/dllmain.cpp index 2fcfb65..6a54f0d 100644 --- a/src/dllmain.cpp +++ b/src/dllmain.cpp @@ -36,7 +36,7 @@ ES_API(CPPESSENCE) unsigned long getauxval(unsigned long type) { #endif namespace { - ES_KEEP_ALIVE [[maybe_unused]] struct init { + [[maybe_unused]] ES_KEEP_ALIVE struct init { init() { try { #ifdef _WIN32 diff --git a/src/environment.cpp b/src/environment.cpp index 62b4ae0..90e92e1 100644 --- a/src/environment.cpp +++ b/src/environment.cpp @@ -125,7 +125,7 @@ namespace essence { raw_argv = argv; }; - ES_KEEP_ALIVE [[maybe_unused]] struct init { + [[maybe_unused]] ES_KEEP_ALIVE struct init { init() { command_line_args.reserve(raw_argc); diff --git a/src/imaging/bmp.cpp b/src/imaging/bmp.cpp index faae8a4..c480564 100644 --- a/src/imaging/bmp.cpp +++ b/src/imaging/bmp.cpp @@ -134,7 +134,7 @@ namespace essence::imaging { } }; - ES_KEEP_ALIVE [[maybe_unused]] struct init { + [[maybe_unused]] ES_KEEP_ALIVE struct init { init() { register_image_header_extractor(abstract::image_header_extractor{bmp_header_extractor{}}); } diff --git a/src/imaging/jfif.cpp b/src/imaging/jfif.cpp index 0ba30c5..d5df812 100644 --- a/src/imaging/jfif.cpp +++ b/src/imaging/jfif.cpp @@ -134,7 +134,7 @@ namespace essence::imaging { } }; - ES_KEEP_ALIVE [[maybe_unused]] struct init { + [[maybe_unused]] ES_KEEP_ALIVE struct init { init() { register_image_header_extractor(abstract::image_header_extractor{jfif_header_extractor{}}); } diff --git a/src/imaging/png.cpp b/src/imaging/png.cpp index 71aec15..fb77652 100644 --- a/src/imaging/png.cpp +++ b/src/imaging/png.cpp @@ -145,7 +145,7 @@ namespace essence::imaging { } }; - ES_KEEP_ALIVE [[maybe_unused]] struct init { + [[maybe_unused]] ES_KEEP_ALIVE struct init { init() { register_image_header_extractor(abstract::image_header_extractor{png_header_extractor{}}); } diff --git a/src/io/compression_zlibng.cpp b/src/io/compression_zlibng.cpp index b33f8c6..651991f 100644 --- a/src/io/compression_zlibng.cpp +++ b/src/io/compression_zlibng.cpp @@ -55,7 +55,7 @@ namespace essence::io { void decompress(std::span buffer, const abstract::writable_buffer& result) {} - ES_KEEP_ALIVE [[maybe_unused]] struct init { + [[maybe_unused]] ES_KEEP_ALIVE struct init { init() { add_compression_routines(compression_mode::zlib, compression_routines{ .compress = &compress, diff --git a/src/io/compression_zstd.cpp b/src/io/compression_zstd.cpp index 69fc1f2..8034311 100644 --- a/src/io/compression_zstd.cpp +++ b/src/io/compression_zstd.cpp @@ -65,7 +65,7 @@ namespace essence::io { check_error(ZSTD_decompress(result.data(), result.size_bytes(), buffer.data(), buffer.size())); } - ES_KEEP_ALIVE [[maybe_unused]] struct init { + [[maybe_unused]] ES_KEEP_ALIVE struct init { init() { add_compression_routines(compression_mode::zstd, compression_routines{ .compress = &compress,