diff --git a/meta/Makefile b/meta/Makefile index b18386596..98b915ca3 100644 --- a/meta/Makefile +++ b/meta/Makefile @@ -90,7 +90,7 @@ xml: $(DEPS) Doxyfile $(CONSTHEADERS) EXTRA = acronyms.txt aspell.en.pws *.pm *.cap saimetadatatest.c saimetadata.c saimetadata.h: xml $(XMLDEPS) parse.pl $(CONSTHEADERS) $(EXTRA) - perl parse.pl + perl -I. parse.pl HEADERS = saimetadata.h $(CONSTHEADERS) diff --git a/meta/saisanitycheck.c b/meta/saisanitycheck.c index 914301f7d..96e860fec 100644 --- a/meta/saisanitycheck.c +++ b/meta/saisanitycheck.c @@ -852,6 +852,8 @@ void check_attr_default_required( break; } + META_MD_ASSERT_FAIL(md, "default value on chardata const"); + case SAI_ATTR_VALUE_TYPE_ACL_FIELD_DATA_OBJECT_LIST: case SAI_ATTR_VALUE_TYPE_ACL_ACTION_DATA_OBJECT_LIST: case SAI_ATTR_VALUE_TYPE_ACL_FIELD_DATA_UINT8_LIST: diff --git a/meta/saiserializetest.c b/meta/saiserializetest.c index 18e59985a..7cce036d5 100644 --- a/meta/saiserializetest.c +++ b/meta/saiserializetest.c @@ -757,14 +757,14 @@ void test_deserialize_ip_prefix() uint16_t ip6[] = { 0x1111, 0x2222, 0x3303, 0x4444, 0x5555, 0x6666, 0xaaaa, 0xbbbb }; uint16_t mask[16]; - memset(mask, 0xff, 16); + memset(mask, 0xff, sizeof(mask)); res = sai_deserialize_ip_prefix("1111:2222:333:4444:5555:6666:aaaa:bbbb/128", &prefix); ASSERT_TRUE(prefix.addr_family == SAI_IP_ADDR_FAMILY_IPV6, "expected true"); ASSERT_TRUE(memcmp(prefix.addr.ip6, ip6, 16) == 0, "expected true"); ASSERT_TRUE(memcmp(prefix.mask.ip6, mask, 16) == 0, "expected true"); ASSERT_TRUE(res == (int)strlen("1111:2222:333:4444:5555:6666:aaaa:bbbb/128"), "expected true: %d", res); - memset(mask, 0, 16); + memset(mask, 0, sizeof(mask)); memset(mask, 0xff, 8); ((uint8_t*)mask)[8] = 0x80; @@ -777,7 +777,7 @@ void test_deserialize_ip_prefix() ASSERT_TRUE(memcmp(prefix.addr.ip6, ip6a, 16) == 0, "expected true"); ASSERT_TRUE(memcmp(prefix.mask.ip6, mask, 16) == 0, "expected true"); - memset(mask, 0, 16); + memset(mask, 0, sizeof(mask)); res = sai_deserialize_ip_prefix("1::ff/0", &prefix); ASSERT_TRUE(prefix.addr_family == SAI_IP_ADDR_FAMILY_IPV6, "expected true"); ASSERT_TRUE(res == (int)strlen("1::ff/0"), "expected true"); @@ -787,7 +787,7 @@ void test_deserialize_ip_prefix() uint16_t ip6b[] = { 0, 0, 0, 0, 0, 0, 0, 0x100 }; - memset(mask, 0xff, 16); + memset(mask, 0xff, sizeof(mask)); res = sai_deserialize_ip_prefix("::1/128", &prefix); ASSERT_TRUE(prefix.addr_family == SAI_IP_ADDR_FAMILY_IPV6, "expected true"); ASSERT_TRUE(res == (int)strlen("::1/128"), "expected true"); diff --git a/meta/test.pm b/meta/test.pm index 7696027a6..862c3efbf 100644 --- a/meta/test.pm +++ b/meta/test.pm @@ -248,7 +248,7 @@ sub CreateApiNameTest } WriteTest " {"; - WriteTest " sai_${api}_api_t ${api}_api;"; + WriteTest " sai_${api}_api_t ${api}_api = { 0 };"; if (defined $main::NON_OBJECT_ID_STRUCTS{$ot}) {