Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#5252 closed Patches (duplicate)

Remove extraneous parentheses around '==' if-expression

Reported by: chandlerc@… 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)

fix-parentheses.patch (466 bytes ) - added by chandlerc@… 12 years ago.
Fixes extraneous parentheses around '==' operator.

Download all attachments as: .zip

Change History (3)

by chandlerc@…, 12 years ago

Attachment: fix-parentheses.patch added

Fixes extraneous parentheses around '==' operator.

comment:1 by Steven Watanabe, 12 years ago

Resolution: duplicate
Status: newclosed

Duplicates #5250.

comment:2 by Steven Watanabe, 12 years ago

Component: Nonedate_time
Note: See TracTickets for help on using tickets.