Last change
on this file since d96f7c4 was
10b5970,
checked in by Michael Brooks <mlbrooks@…>, 2 weeks ago
|
Fix many test-suite- and libcfa-caused unused variable warnings.
In scope are easy fixes among tests whose sole warnings were unused variable. Reduces the wflags lax list by 40%.
|
-
Property mode set to
100644
|
File size:
337 bytes
|
Line | |
---|
1 | // Test increment and decrement operation: |
---|
2 | #include <assert.h> |
---|
3 | |
---|
4 | enum() Number { One, Two, Three }; |
---|
5 | |
---|
6 | int main() { |
---|
7 | Number a = One; |
---|
8 | |
---|
9 | assert( Two == ++a ); |
---|
10 | assert( Two == a ); |
---|
11 | |
---|
12 | assert( Two == a++ ); |
---|
13 | assert( Three == a ); |
---|
14 | |
---|
15 | assert( Two == --a ); |
---|
16 | assert( Two == a ); |
---|
17 | |
---|
18 | assert( Two == a-- ); |
---|
19 | assert( One == a ); |
---|
20 | |
---|
21 | printf( "done!\n" ); |
---|
22 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.