Skip to content

Commit 348f9e7

Browse files
committed
[lldb] Fix warning: comparison of unsigned expression in >= 0 is always true
lldb/source/Plugins/Language/CPlusPlus/LibCxx.cpp:1195:15: warning: comparison of unsigned expression in ‘>= 0’ is always true 1195 | if (weekday >= 0 && weekday < 7) | ~~~~~~~~^~~~
1 parent 375ddd6 commit 348f9e7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lldb/source/Plugins/Language/CPlusPlus/LibCxx.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1192,7 +1192,7 @@ bool lldb_private::formatters::LibcxxChronoWeekdaySummaryProvider(
11921192
return false;
11931193

11941194
const unsigned weekday = ptr_sp->GetValueAsUnsigned(0);
1195-
if (weekday >= 0 && weekday < 7)
1195+
if (weekday < 7)
11961196
stream << "weekday=" << weekdays[weekday];
11971197
else
11981198
stream.Printf("weekday=%u", weekday);

0 commit comments

Comments
 (0)