Changeset 10b5970 for tests/ctrl-flow


Ignore:
Timestamp:
Jan 7, 2025, 3:22:19 PM (8 months ago)
Author:
Michael Brooks <mlbrooks@…>
Branches:
master
Children:
190a833
Parents:
70670e7
Message:

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%.

Location:
tests/ctrl-flow
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • tests/ctrl-flow/goto.cfa

    r70670e7 r10b5970  
    1616}
    1717
    18 int main(int argc, char * argv[]) {
     18int main() {
    1919        sout | nlOff;
    2020
  • tests/ctrl-flow/ifwhileCtl.cfa

    r70670e7 r10b5970  
    1919
    2020int main( void ) {
    21         int x = 4, y = 3;
     21        int x = 4, y = 3;               (void) x; (void) y;
    2222
    2323        if ( int x = 1 ) {
     
    4242
    4343        if ( struct S { int i; } s = { 3 }; s.i < 4 ) {
    44                 S s1;
     44                S s1;   (void) s1;
    4545                sout | "s.i < 4 correct";
    4646        } else {
    47                 S s1;
     47                S s1;   (void) s1;
    4848                sout | "s.i >= 4 incorrect";
    4949        } // if
     
    6464
    6565        while ( struct S { int i; } s = { 3 }; s.i < 4 ) {
    66                 S s1;
     66                S s1;   (void) s1;
    6767                sout | "s.i < 4 correct";
    6868                break;
Note: See TracChangeset for help on using the changeset viewer.