Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-Wparentheses-equality in drivers/scsi/advansys.c #155

Closed
tpimh opened this issue Sep 20, 2018 · 3 comments
Closed

-Wparentheses-equality in drivers/scsi/advansys.c #155

tpimh opened this issue Sep 20, 2018 · 3 comments
Assignees
Labels
-Wparentheses-equality [BUG] linux A bug that should be fixed in the mainline kernel. [FIXED][LINUX] 4.20 This bug was fixed in Linux 4.20

Comments

@tpimh
Copy link

tpimh commented Sep 20, 2018

drivers/scsi/advansys.c:6451:20: warning: equality comparison with
      extraneous parentheses [-Wparentheses-equality]
                                if ((sdtr_data == 0xFF)) {
                                     ~~~~~~~~~~^~~~~~~
drivers/scsi/advansys.c:6451:20: note: remove extraneous parentheses
      around the comparison to silence this warning
                                if ((sdtr_data == 0xFF)) {
                                    ~          ^      ~
drivers/scsi/advansys.c:6451:20: note: use '=' to turn this equality
      comparison into an assignment
                                if ((sdtr_data == 0xFF)) {
                                               ^~
                                               =
1 warning generated.
@tpimh tpimh added [BUG] linux A bug that should be fixed in the mainline kernel. low priority This bug is not critical and not a priority -Wparentheses-equality labels Sep 20, 2018
@nathanchance
Copy link
Member

@nathanchance nathanchance self-assigned this Sep 20, 2018
@nathanchance nathanchance added [PATCH] Exists There is a patch that fixes this issue [PATCH] Submitted A patch has been submitted for review and removed [PATCH] Exists There is a patch that fixes this issue labels Sep 20, 2018
fengguang pushed a commit to 0day-ci/linux that referenced this issue Sep 21, 2018
Clang warns when multiple pairs of parentheses are used for a single
conditional statement.

drivers/scsi/advansys.c:6451:20: warning: equality comparison with
extraneous parentheses [-Wparentheses-equality]
                                if ((sdtr_data == 0xFF)) {
                                     ~~~~~~~~~~^~~~~~~
drivers/scsi/advansys.c:6451:20: note: remove extraneous parentheses
around the comparison to silence this warning
                                if ((sdtr_data == 0xFF)) {
                                    ~          ^      ~
drivers/scsi/advansys.c:6451:20: note: use '=' to turn this equality
comparison into an assignment
                                if ((sdtr_data == 0xFF)) {
                                               ^~
                                               =
1 warning generated.

Link: ClangBuiltLinux#155
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
@nathanchance nathanchance added [PATCH] Accepted A submitted patch has been accepted upstream and removed [PATCH] Submitted A patch has been submitted for review labels Sep 26, 2018
@nathanchance
Copy link
Member

@nathanchance nathanchance added [FIXED][LINUX] 4.20 This bug was fixed in Linux 4.20 and removed [PATCH] Accepted A submitted patch has been accepted upstream labels Oct 25, 2018
@tpimh tpimh removed the low priority This bug is not critical and not a priority label Oct 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
-Wparentheses-equality [BUG] linux A bug that should be fixed in the mainline kernel. [FIXED][LINUX] 4.20 This bug was fixed in Linux 4.20
Projects
None yet
Development

No branches or pull requests

2 participants