Skip to content

Define UNUSED for the clang parse so attributed parameters are not dropped#38

Merged
estebanzimanyi merged 1 commit into
MobilityDB:masterfrom
estebanzimanyi:fix/clang-unused-macro-param-drop
Jul 9, 2026
Merged

Define UNUSED for the clang parse so attributed parameters are not dropped#38
estebanzimanyi merged 1 commit into
MobilityDB:masterfrom
estebanzimanyi:fix/clang-unused-macro-param-drop

Conversation

@estebanzimanyi

Copy link
Copy Markdown
Member

MEOS marks deliberately-unused parameters with the UNUSED attribute macro
(e.g. Datum dist UNUSED). The macro is defined in temporal.h, but the
amalgamated parse entry point can reach a header that uses it before that
definition is in scope. clang then treats UNUSED as an unknown token, errors
on the declarator, and silently drops every remaining parameter of that
prototype.

This truncated several catalog signatures: the tcbuffer/tgeo segment
distance turning-point helpers (tcbuffersegm_distance_turnpt,
tgeompointsegm_distance_turnpt, tgeogpointsegm_distance_turnpt) lost their
lower/upper/t1/t2 parameters, which in turn dropped their @param[out]
out-parameters and left them reported as name-not-in-signature drift.

Define UNUSED on the clang command line so it is always in scope, independent
of header ordering. After the fix the three helpers regain their full 9-parameter
signatures with outParams: ['t1','t2'], the captured out-parameter count rises
(438 → 464 against MobilityDB master 06c59e2002), and the @param[out] drift
report drops to 0.

…opped

MEOS marks deliberately-unused parameters with the `UNUSED` attribute macro
(e.g. `Datum dist UNUSED`). The macro is defined in temporal.h, but the
amalgamated parse entry point can reach a header that uses it before that
definition is in scope; clang then treats `UNUSED` as an unknown token,
errors on the declarator, and silently drops every remaining parameter of the
prototype. This truncated several catalog signatures (the tcbuffer/tgeo
segment distance turning-point helpers lost their lower/upper/t1/t2
parameters, dropping their `@param[out]` out-parameters as well).

Define `UNUSED` on the clang command line so it is always in scope,
independent of header ordering.
@estebanzimanyi estebanzimanyi merged commit 72b2632 into MobilityDB:master Jul 9, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant