# https://github.com/macports/macports-ports/pull/28680#issuecomment-3913517186 --- a/sql/my_json_writer.cc 2026-02-17 17:18:40 +++ b/sql/my_json_writer.cc 2026-02-17 17:19:48 @@ -234,8 +234,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; @@ -267,8 +269,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;