[meta] Add custom range start/end to sai_object_type_t and sai_api_t as workaround for internal enum size #1926
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.
Workadound for #1925
Since SAI_OBJECT_TYPE_EXTENSIONS_MAX is declared as define, compiler warns about:
error: the result of the conversion is unspecified because .129. is outside the range of type .sai_object_type_t. {aka
._sai_object_type_t.} [-Werror=conversion]
when next value exceeds 7 bits, since that's enough for encode all values for sai_object_type_t. Unfortunetly #pragma GCC diagnostic ignored "-Wconversion" is not working (probably gcc bug) then workaround needs to be addressed in other way.
Those custom ranges can be removed after actual SAI_OBJECT_TYPE_MAX will reach 128 value