Skip to content

Conversation

@rdck
Copy link

@rdck rdck commented Sep 12, 2022

The Microsoft C compiler at warning level 3 (/W3) complains about various integer casts. I assume microui doesn't intend to handle the cases where these casts would overflow. I think it's worth making the casts explicit, to express that this is the intended behavior.

@rilysh
Copy link

rilysh commented Jul 10, 2023

MSVC showing the integer casting warning message because microui uses the wrong type-casting for strlen. strlen on both 32-bit and 64-bit in x86 and amd64 returns an unsigned long but microui has unsigned as the type. See here.

There are other points I saw where microui uses that same wrong type for a specific purpose. MSVC explicitly sees microui as a C++ file thus it leads to explicit casting since C++ requires you to do so.

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