mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 09:34:59 +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:
parent
a103a85ae6
commit
d809637023
4 changed files with 8 additions and 8 deletions
|
@ -63,8 +63,9 @@ bool FILE::flush()
|
|||
}
|
||||
if (m_mode & O_RDONLY) {
|
||||
// When open for reading, just drop the buffered data.
|
||||
VERIFY(m_buffer.buffered_size() <= NumericLimits<off_t>::max());
|
||||
off_t had_buffered = m_buffer.buffered_size();
|
||||
if constexpr (sizeof(size_t) >= sizeof(off_t))
|
||||
VERIFY(m_buffer.buffered_size() <= NumericLimits<off_t>::max());
|
||||
off_t had_buffered = static_cast<off_t>(m_buffer.buffered_size());
|
||||
m_buffer.drop();
|
||||
// Attempt to reset the underlying file position to what the user
|
||||
// expects.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue