# https://github.com/macports/macports-ports/pull/28680#issuecomment-3913517186 --- a/sql/my_json_writer.cc 2026-02-17 21:18:18 +++ b/sql/my_json_writer.cc 2026-02-17 21:19:23 @@ -256,8 +256,10 @@ void Json_writer::add_unquoted_str(const char* str, size_t len) { +#if !defined(NDEBUG) || defined(JSON_WRITER_UNIT_TEST) VALIDITY_ASSERT(fmt_helper.is_making_writer_calls() || got_name == named_item_expected()); +#endif if (on_add_str(str, len)) return; @@ -289,8 +291,10 @@ void Json_writer::add_str(const char* str, size_t num_bytes) { +#if !defined(NDEBUG) || defined(JSON_WRITER_UNIT_TEST) VALIDITY_ASSERT(fmt_helper.is_making_writer_calls() || got_name == named_item_expected()); +#endif if (on_add_str(str, num_bytes)) return;