赋值语句没有意义,对象的值没有再被使用;
操作是多余的,结果永远是操作符左值。
工具/原料
1
Rule2.2 2983 2985
2
MISRA C:2012
Rule2.2 2983
1
2
2983 This assignment is redundant. The value of this object is never subsequently used. 赋值语句似乎没有意义。因为对象的值在离开作用域前没有被使用过。
3
官方示例
4
编程规范修改举例END
Rule2.2 2985
1
规则与等级对应关系(QAC)
2
2985 This operation is redundant. The value of the result is always that of the left-hand operand. 这个操作是多余的,因为其结果可用操作符左值代替。
3
官方示例
4
编程规范修改举例END
上一篇:PHP运算符之赋值运算符