]> granicus.if.org Git - transmission/commit
Extract assignments from expression
authorMike Gelfand <mikedld@mikedld.com>
Sun, 17 Mar 2019 05:00:15 +0000 (08:00 +0300)
committerMike Gelfand <mikedld@mikedld.com>
Sun, 17 Mar 2019 05:00:15 +0000 (08:00 +0300)
commit17307e748499721664e99dc92332a553d58f02df
tree301fffd18a591d030118bc103647b1695a2d84eb
parentd3b8982195b7cfe664841afb777c6cfa01ea0c77
Extract assignments from expression

Assignments explicitly enclosed in parentheses are ignored.

* MISRA C:2004, 13.1 - Assignment operators shall not be used in expressions
  that yield a Boolean value
* MISRA C++:2008, 6-2-1 - Assignment operators shall not be used in
  sub-expressions
* MISRA C:2012, 13.4 - The result of an assignment operator should not be used
* MITRE, CWE-481 - Assigning instead of Comparing
* CERT, EXP45-C. - Do not perform assignments in selection statements
* CERT, EXP51-J. - Do not perform assignments in conditional expressions
15 files changed:
gtk/stats.c
gtk/tr-core.c
gtk/util.c
libtransmission/announcer.c
libtransmission/metainfo.c
libtransmission/peer-mgr.c
libtransmission/peer-msgs.c
libtransmission/rpcimpl.c
libtransmission/torrent-magnet.c
libtransmission/utils-test.c
libtransmission/variant-json.c
libtransmission/variant.c
libtransmission/web.c
utils/edit.c
utils/show.c