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

Supress conversion warnings #72

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

Conversation

petershh
Copy link

MCST LCC compiler declares size_t as unigned long. In some places,
size_t values obtained from sizeof calls are implicitly converted to int
or unsigned int, triggering Wconversion warning.

To supress such warnings, add explicit casts to needed type. This is
safe since sizeof returns way smaller than int's limit.

Fixes #52

MCST LCC compiler declares size_t as unigned long. In some places,
size_t values obtained from sizeof calls are implicitly converted to int
or unsigned int, triggering Wconversion warning.

To supress such warnings, add explicit casts to needed type. This is
safe since sizeof returns way smaller than int's limit.
schellingb added a commit that referenced this pull request Sep 13, 2023
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.

"conversion may change the value [-Werror=conversion]" compilation errors on MCST lcc compiler
1 participant