1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 10:38:13 +00:00

Userland: Resolve tautological-constant-out-of-range-compare warnings

Stop comparing platform-specific sized integer types to max() values of
other interger types. Enable the warning everywhere.
This commit is contained in:
Andrew Kaster 2022-01-03 02:50:55 -07:00 committed by Brian Gianforcaro
parent a103a85ae6
commit d809637023
4 changed files with 8 additions and 8 deletions

View file

@ -346,7 +346,7 @@ public:
{
if (size_to_grow == 0)
return true;
auto new_size = m_data.size() + size_to_grow;
u64 new_size = m_data.size() + size_to_grow;
// Can't grow past 2^16 pages.
if (new_size >= Constants::page_size * 65536)
return false;