#5252 closed Patches (duplicate)
Remove extraneous parentheses around '==' if-expression
Reported by: | Owned by: | ||
---|---|---|---|
Milestone: | To Be Determined | Component: | date_time |
Version: | Boost Development Trunk | Severity: | Problem |
Keywords: | Cc: |
Description
Without this patch, Clang produces the following warning:
% clang++ -fsyntax-only -Wparentheses -I . boost/date_time/gregorian_calendar.hpp In file included from boost/date_time/gregorian_calendar.hpp:63: ./boost/date_time/gregorian_calendar.ipp:50:15: warning: equality comparison with extraneous parentheses [-Wparentheses]
if ((week == 53)) {
~
./boost/date_time/gregorian_calendar.ipp:50:15: note: use '=' to turn this equality comparison into an assignment
if ((week == 53)) {
~ =
./boost/date_time/gregorian_calendar.ipp:50:15: note: remove extraneous parentheses around the comparison to silence this warning
if ((week == 53)) {
~ ~
1 warning generated.
Attachments (1)
Change History (3)
by , 12 years ago
Attachment: | fix-parentheses.patch added |
---|
comment:2 by , 12 years ago
Component: | None → date_time |
---|
Fixes extraneous parentheses around '==' operator.