Detect unused struct members
Hi,
I've noticed that CLion successfully detects struct members not being used when selecting "find usages".
Is it possible to perform code analysis /cleanup and detect struct members not being used/used for write only?
For example:
#include <stdio.h>
typedef struct
{
int a;
int b_unused;
int c_writeOnly;
} test_t
int main()
{
test_t test;
test.a=1;
test.c_writeOnly=2;
printf("Test: a=%d", test.a);
return 0;
}
Please sign in to leave a comment.