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

AGS: Shared: Debugging: Fix outside the range of underlying type 'uint32' on out.h #5316

Closed
wants to merge 1 commit into from

Conversation

Kelvfimer
Copy link

AGS: Shared: Debugging: Fix outside the range of underlying type 'uint32' on out.h

Increase kDbgGroup_None size Max from uint32 size max to uint64 size max changing the type from uint32 to uint64

The change fixes the issue https://bugs.scummvm.org/ticket/14609 that reports an error: enumerator value '18446744073709551615' is outside the range of underlying type 'uint32' {aka 'unsigned int'} when building scummvm on odroid n2+ linux 4.9 EMUELEC.

thx
KR

@lephilousophe
Copy link
Member

The SIZE_MAX value is defined in engines/ags/shared/core/types.h to 0xffffffff.
This fits inside uint32.
Could you check from where comes your bogus value?
You can do this by running make VERBOSE_BUILD=1, copy the compile line of the failing object, add -E flag to stop at preprocessing mode and add some flag amongst -dU, -dI, -dD.
Thank you.

@Kelvfimer
Copy link
Author

I will debug it next week.

Didn't know the variable was set up in other file. However is strange as changing to uint64 fixes the issue.

@lephilousophe
Copy link
Member

For a reason I ignore, with your toolchain, the SIZE_MAX macro gets defined to a large 64 bits number so it means you need to use uint64 to store it.
But, after looking at upstream code, it uses UINT32_MAX.
So instead of changing the enum type, please change SIZE_MAX to UINT32_MAX: this should do it.

@Kelvfimer
Copy link
Author

Hello @lephilousophe

I tested your change and it worked too :) So UINT32_MAX works. Thx so much

Pls Can you change the file or I have to create a new pull request?

thx

lephilousophe added a commit that referenced this pull request Sep 17, 2023
@lephilousophe
Copy link
Member

Thanks, I merged the change.

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