Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion meta/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ saidepgraph.svg: saidepgraph.gv
.PHONY: clean

clean:
rm -f *.o *~ .*~ *.tmp .*.swp .*.swo *.bak sai*.gv sai*.svg *.o.symbols
rm -f *.o *~ .*~ *.tmp .*.swp .*.swo *.bak sai*.gv sai*.svg *.o.symbols doxygen*.db
rm -f saimetadata.h saimetadata.c saimetadatatest.c
rm -f saisanitycheck saimetadatatest saiserializetest saidepgraphgen
rm -rf xml html dist temp
12 changes: 9 additions & 3 deletions meta/saisanitycheck.c
Original file line number Diff line number Diff line change
Expand Up @@ -5220,9 +5220,15 @@ void check_sai_version()

/* SAI_VERSION uses 100 base for each component, so each define must not exceed this value */

META_ASSERT_TRUE((SAI_MAJOR) >= 0 && (SAI_MAJOR) < 100, "invalid SAI_MAJOR version: %d", (SAI_MAJOR));
META_ASSERT_TRUE((SAI_MINOR) >= 0 && (SAI_MINOR) < 100, "invalid SAI_MINOR version: %d", (SAI_MINOR));
META_ASSERT_TRUE((SAI_REVISION) >= 0 && (SAI_REVISION) < 100, "invalid SAI_REVISION version: %d", (SAI_REVISION));
/* Make sure sai version components are assignable to uint32_t */

uint32_t major = SAI_MAJOR;
uint32_t minor = SAI_MINOR;
uint32_t revision = SAI_REVISION;

META_ASSERT_TRUE((major) < 100, "invalid SAI_MAJOR version: %d", (SAI_MAJOR));
META_ASSERT_TRUE((minor) < 100, "invalid SAI_MINOR version: %d", (SAI_MINOR));
META_ASSERT_TRUE((revision) < 100, "invalid SAI_REVISION version: %d", (SAI_REVISION));
}

void check_max_conditions_len()
Expand Down