Skip to content

OCS_off_t should be a signed type #593

@jphickey

Description

@jphickey

Describe the bug
OCS_off_t is used for OSAL coverage testing to replace the C library off_t type as used in e.g. lseek()
This is being substituted with an unsigned type, but really should be a signed type.

To Reproduce
Suggested change in PR #592 exposes the mismatch:

https://github.com/klystron78/osal/blob/862f1322da247b1ae8a93a9e25e3f76bb5fa8d8e/src/os/portable/os-impl-posix-io.c#L106

Coverage test fails due to later comparison for (result < 0) which is impossible with unsigned type.

System observed on:
Ubuntu 20.04

Additional context
Using long instead fixes it.

Reporter Info
Joseph Hickey, Vantage Systems, Inc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions