Define UNUSED for the clang parse so attributed parameters are not dropped#38
Merged
estebanzimanyi merged 1 commit intoJul 9, 2026
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
MEOS marks deliberately-unused parameters with the
UNUSEDattribute macro(e.g.
Datum dist UNUSED). The macro is defined intemporal.h, but theamalgamated parse entry point can reach a header that uses it before that
definition is in scope. clang then treats
UNUSEDas an unknown token, errorson the declarator, and silently drops every remaining parameter of that
prototype.
This truncated several catalog signatures: the
tcbuffer/tgeosegmentdistance turning-point helpers (
tcbuffersegm_distance_turnpt,tgeompointsegm_distance_turnpt,tgeogpointsegm_distance_turnpt) lost theirlower/upper/t1/t2parameters, which in turn dropped their@param[out]out-parameters and left them reported as
name-not-in-signaturedrift.Define
UNUSEDon the clang command line so it is always in scope, independentof 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]driftreport drops to 0.