You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With GCC 12, there is a compiler error in saimetadatatest.c generated code. Compiler error:
saimetadatatest.c: In function 'api_name_test':
saimetadatatest.c:6:15: error: dangling pointer 'dummy' to 'ge' may be used [-Werror=dangling-pointer=]
6 | #define PP(x) printf("%p\n", (x));
| ^~~~~~~~~~~~~~~~~~~
saimetadatatest.c:3533:5: note: in expansion of macro 'PP'
3533 | PP(dummy);
| ^~
saimetadatatest.c:3514:40: note: 'ge' declared here
3514 | sai_get_vip_entry_attribute_fn ge = NULL;
| ^~
cc1: all warnings being treated as errors
make: *** [Makefile:140: saimetadatatest.o] Error 1
vip_entry_create_fn create = dash_vip_api.create_vip_entry;
vip_entry_remove_fn remove = dash_vip_api.remove_vip_entry;
vip_entry_set_fn set = dash_vip_api.set_vip_entry_attribute;
vip_entry_get_fn get = dash_vip_api.get_vip_entry_attribute;
sai_create_vip_entry_fn cr = NULL;
sai_remove_vip_entry_fn re = NULL;
sai_set_vip_entry_attribute_fn se = NULL;
sai_get_vip_entry_attribute_fn ge = NULL; // Line 3514
dummy = &create;
dummy = &remove;
dummy = &set;
dummy = &get;
dummy = &cr;
dummy = &re;
dummy = &se;
dummy = ≥
checked[(int)SAI_OBJECT_TYPE_VIP_ENTRY] = SAI_OBJECT_TYPE_VIP_ENTRY;
}
int index = SAI_OBJECT_TYPE_NULL;
for (; index < (int)SAI_OBJECT_TYPE_EXTENSIONS_MAX; ++index)
{
printf("checking: %s checked (%d) == index (%d)\n",
sai_metadata_enum_sai_object_type_t.valuesnames[index],
checked[index],(sai_object_type_t)index);
TEST_ASSERT_TRUE(checked[index] == (sai_object_type_t)index, "not all objects were processed");
}
PP(dummy); // Line 3533
}
The text was updated successfully, but these errors were encountered:
kcudnik
added a commit
to kcudnik/SAI
that referenced
this issue
Apr 17, 2024
With GCC 12, there is a compiler error in
saimetadatatest.c
generated code. Compiler error:The text was updated successfully, but these errors were encountered: