Skip to content

Commit

Permalink
Avoid compiler warnings about unused variable
Browse files Browse the repository at this point in the history
As max_trace_spans is used only for ASSERT, declare it with
PG_USED_FOR_ASSERTS_ONLY.
  • Loading branch information
bdrouvot authored and bonnefoa committed Sep 16, 2024
1 parent fba33c2 commit b744ba8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pg_tracing.c
Original file line number Diff line number Diff line change
Expand Up @@ -1361,7 +1361,7 @@ handle_pg_error(const Traceparent * traceparent,
{
int sql_error_code;
Span *span;
int max_trace_spans = current_trace_spans->max;
int max_trace_spans PG_USED_FOR_ASSERTS_ONLY = current_trace_spans->max;

sql_error_code = geterrcode();

Expand Down

0 comments on commit b744ba8

Please sign in to comment.