pfultz2/cppcheck

new check: Statement with no effect

pfultz2 opened this issue · 0 comments

typedef struct {int val;} state_t;
void f(state_t *s)
{
    (*s).val; // statement with no effect
}

https://trac.cppcheck.net/ticket/6504

	std::string a;
	int t;

	t;
	a + "hi";
	"yo";
	23;
	1 + 2 / 3;

https://trac.cppcheck.net/ticket/7529