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
Describe the bug
When building for VxWorks 7 a C++ app, I get the error:
error: narrowing conversion of 'value' from 'long unsigned int' to 'uint32_t' {aka 'unsigned int'} inside { } [-Werror=narrowing]
I fixed it by changing code to:
#ifdef OSAL_OMIT_DEPRECATED
osal_id_t idv = {(uint32)value};
#else
osal_id_t idv = (osal_id_t)value;
#endif
return idv;
The code above still narrow down value from long unsigned to int unsigned.
I understand that both VxWorks 7 and C++ are not supported, so really the question is:
Shouldn't OS_ObjectIdFromInteger be taking an integer in spite of a long since the returned values is always an int?
Describe the bug
When building for VxWorks 7 a C++ app, I get the error:
error: narrowing conversion of 'value' from 'long unsigned int' to 'uint32_t' {aka 'unsigned int'} inside { } [-Werror=narrowing]
I fixed it by changing code to:
#ifdef OSAL_OMIT_DEPRECATED
osal_id_t idv = {(uint32)value};
#else
osal_id_t idv = (osal_id_t)value;
#endif
return idv;
The code above still narrow down value from long unsigned to int unsigned.
I understand that both VxWorks 7 and C++ are not supported, so really the question is:
To Reproduce
Expected behavior
Build without errors
Code snips
osapi-idmap.h L105
System observed on:
Additional context
Reporter Info
Claudio Olmi
NASA JSC
The text was updated successfully, but these errors were encountered: