Describe the bug
In some functions, e.g. CF_WriteQueueDataToFile, CF_WriteHistoryQueueDataToFile, the OSAL file descriptor is being passed as an int32. This is incorrect, but allowed by the backward-compatibility features in OSAL. In a future version, this will become an error.
To Reproduce
Build OSAL with type-safe ID. Implicit conversion of ID to/from an integer will fail to compile.
Expected behavior
Use osal_id_t type instead, which is the correct type for an OSAL ID.
Code snips
|
int32 CF_WriteQueueDataToFile(int32 fd, CF_Channel_t *c, CF_QueueIdx_t q); |
|
int32 CF_WriteHistoryQueueDataToFile(int32 fd, CF_Channel_t *c, CF_Direction_t dir); |
System observed on:
Ubuntu 21.10
Reporter Info
Joseph Hickey, Vantage Systems, Inc.
Describe the bug
In some functions, e.g. CF_WriteQueueDataToFile, CF_WriteHistoryQueueDataToFile, the OSAL file descriptor is being passed as an
int32. This is incorrect, but allowed by the backward-compatibility features in OSAL. In a future version, this will become an error.To Reproduce
Build OSAL with type-safe ID. Implicit conversion of ID to/from an integer will fail to compile.
Expected behavior
Use
osal_id_ttype instead, which is the correct type for an OSAL ID.Code snips
CF/fsw/src/cf_utils.h
Line 224 in d3ae3f9
CF/fsw/src/cf_utils.h
Line 239 in d3ae3f9
System observed on:
Ubuntu 21.10
Reporter Info
Joseph Hickey, Vantage Systems, Inc.