| Summary: |
bad programming in smssendprovider "warning: suggest parentheses around assignment used as truth value" |
| Product: |
[Unmaintained] kopete
|
Reporter: |
Philipp Rosenberger <philipp> |
| Component: |
SMS Plugin | Assignee: |
Kopete Developers <kopete-bugs-null> |
| Status: |
RESOLVED
FIXED
|
|
|
| Severity: |
minor
|
CC: |
andrew.crouthamel
|
| Priority: |
NOR
|
|
|
| Version First Reported In: |
SVN | |
|
| Target Milestone: |
--- | |
|
| Platform: |
Unlisted Binaries | |
|
| OS: |
Linux | |
|
|
Latest Commit:
|
|
Version Fixed/Implemented In:
|
faf256370135cb2c63968b38818ec3c38e0abe2c
|
|
Sentry Crash Report:
|
|
| |
Version: SVN (using KDE 4.6.4) OS: Linux The assignment in the ifclause is alwasy true. QString message = msg.plainBody(); QString nr = dynamic_cast<SMSContact *>(msg.to().first())->qualifiedNumber(); if (canSend = false) return; values[messagePos] = message; values[telPos] = nr; Reproducible: Didn't try Steps to Reproduce: compile the source, view the source Actual Results: bad programming Expected Results: better code this should fix it: --- protocols/sms/services/smssendprovider.cpp (revision 1277752) +++ protocols/sms/services/smssendprovider.cpp (working copy) @@ -232,7 +232,7 @@ QString message = msg.plainBody(); QString nr = dynamic_cast<SMSContact *>(msg.to().first())->qualifiedNumber(); - if (canSend = false) + if (canSend == false) return; values[messagePos] = message;