commit c53dffdd2c1af46980a62c794e04e4588cd17f32 parent 0031ed32e9ca3b29882aac005fc5f40715b5e8f5 Author: Christian Grothoff <christian@grothoff.org> Date: Thu, 27 Nov 2025 13:50:06 +0100 add invariant check Diffstat:
| M | gnu-taler-error-codes/c.footer | | | 13 | +++++++++++++ |
1 file changed, 13 insertions(+), 0 deletions(-)
diff --git a/gnu-taler-error-codes/c.footer b/gnu-taler-error-codes/c.footer @@ -64,3 +64,15 @@ TALER_ErrorCode_get_http_status_safe (enum TALER_ErrorCode ec) return MHD_HTTP_INTERNAL_SERVER_ERROR; return hc; } + + +void __attribute__ ((constructor)) +TALER_ErrorCode_check_invariants (void); + +void __attribute__ ((constructor)) +TALER_ErrorCode_check_invariants (void) +{ + for (unsigned int i = 1; i < code_hint_pairs_length; i++) + GNUNET_assert (code_hint_pairs[i-1].ec < + code_hint_pairs[i].ec); +} +\ No newline at end of file