Skip to content

Fixed API returning an enum instead of uint64_t.#116

Merged
nayakned merged 1 commit intoCOVESA:mainfrom
nayakned:fix/api
Feb 16, 2026
Merged

Fixed API returning an enum instead of uint64_t.#116
nayakned merged 1 commit intoCOVESA:mainfrom
nayakned:fix/api

Conversation

@nayakned
Copy link
Copy Markdown
Collaborator

C++ does not allow returning fixed width integer when enums are expected. Fixed the only one of the APIs which is doing so.

Avtp_AcfMsgType_t Avtp_AcfCommon_GetAcfMsgType(const Avtp_AcfCommon_t* const pdu)

Signed-off-by: Naresh Nayak <Naresh.Nayak@de.bosch.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a type mismatch in the Avtp_AcfCommon_GetAcfMsgType function by adding an explicit cast from uint64_t to Avtp_AcfMsgType_t. The function signature declares it returns an enum type, but the macro GET_ACF_COMMON_FIELD returns uint64_t. The cast ensures proper type safety, particularly for C++ compatibility.

Changes:

  • Added explicit C-style cast to Avtp_AcfMsgType_t in the return statement of Avtp_AcfCommon_GetAcfMsgType

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@nayakned
Copy link
Copy Markdown
Collaborator Author

Should fix #115

@nayakned nayakned merged commit ea7077f into COVESA:main Feb 16, 2026
11 checks passed
@nayakned nayakned deleted the fix/api branch February 16, 2026 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants