Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Asign value to ptrSize, to avoid maybe-uninitialized warning #407

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

amgross
Copy link
Contributor

@amgross amgross commented Feb 22, 2024

Pull request

Choose Correct

  • bug
  • feature

Describe the pull request

Using G++ compiler on windows, I was getting maybe-uninitialized warning on the if (ptrSize > sizeof(*value)). It is correct because read may not read in case that m_status is bad, although in this case the erpc behaviour is OK because also the updateStatus call will be ignored.

To Reproduce

Expected behavior

No compilation warning

Screenshots

Desktop (please complete the following information):

  • OS: Windows
  • eRPC Version:

Steps you didn't forgot to do

  • I checked if other PR isn't solving this issue.
  • I read Contribution details and did appropriate actions.
  • PR code is tested.
  • PR code is formatted.
  • Allow edits from maintainers pull request option is set (recommended).

Additional context

@amgross
Copy link
Contributor Author

amgross commented Feb 22, 2024

@Hadatko Can you check if the tests failure related to me?

BTW, other solution is to check if (isStatusOk() && ptrSize > sizeof(*value))

@Hadatko
Copy link
Member

Hadatko commented Feb 22, 2024

I created this issue related mac build;
#408

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants