I have used the test variable as: int statistics() { test = &(stud); assert(test->total != 0); return true; } then get error: variable ‘test’ set but not used [-Werror=unused-but-set-variable] if i changed the code to: int statistics() { test = &(stud); if(test->total !=0) { } assert(test->total != 0); return true; } it will compile successfully -- View this message in context: http://gcc.1065356.n5.nabble.com/Werror-tp1235149p1235193.html Sent from the gcc - Help mailing list archive at Nabble.com.