Skip to content

Use proper type instead of "int32" for OSAL IDs #171

@jphickey

Description

@jphickey

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.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions