Changeset 10b5970 for tests/raii


Ignore:
Timestamp:
Jan 7, 2025, 3:22:19 PM (3 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%.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified tests/raii/partial.cfa

    r70670e7 r10b5970  
    1212    // Declaring your own empty ctor leaves an autogen dtor usable
    1313    struct thing1 {};
    14     void ?{}( thing1 & this ) {  printf( "custom ctor\n"); }
     14    void ?{}( thing1 & ) {  printf( "custom ctor\n"); }
    1515    void test1() {
    1616        printf("test1\n");
     
    2020    // Declaring your own empty ctor and dtor leaves an autogen copy ctor usable
    2121    struct thing2 {};
    22     void  ?{}( thing2 & this ) {  printf( "custom ctor\n"); }
    23     void ^?{}( thing2 & this ) {  printf( "custom dtor\n"); }
     22    void  ?{}( thing2 & ) {  printf( "custom ctor\n"); }
     23    void ^?{}( thing2 & ) {  printf( "custom dtor\n"); }
    2424    void test2() {
    2525        printf("test2\n");
     
    3737
    3838    struct thing456 {};
    39     void    ?{}( thing456 & this ) {  printf( "custom ctor\n"); }
     39    void    ?{}( thing456 & ) {  printf( "custom ctor\n"); }
    4040    void    ?{}( thing456 &, thing456 ) = void;
    4141    thing456 & ?=?( thing456 &, thing456 ) = void;
    42     void   ^?{}( thing456 & this ) {  printf( "custom dtor\n"); }
     42    void   ^?{}( thing456 & ) {  printf( "custom dtor\n"); }
    4343
    4444    struct wrapper1 { thing456 x; };
     
    8080// Declaring your own empty ctor leaves an autogen dtor usable
    8181struct thing1 {};
    82 void ?{}( thing1 & this ) {  printf( "custom ctor\n"); }
     82void ?{}( thing1 & ) {  printf( "custom ctor\n"); }
    8383void test1() {
    8484    printf("test1\n");
     
    8888// Declaring your own empty ctor and dtor leaves an autogen copy ctor usable
    8989struct thing2 {};
    90 void  ?{}( thing2 & this ) {  printf( "custom ctor\n"); }
    91 void ^?{}( thing2 & this ) {  printf( "custom dtor\n"); }
     90void  ?{}( thing2 & ) {  printf( "custom ctor\n"); }
     91void ^?{}( thing2 & ) {  printf( "custom dtor\n"); }
    9292void test2() {
    9393    printf("test2\n");
     
    105105
    106106struct thing456 {};
    107 void    ?{}( thing456 & this ) {  printf( "custom ctor\n"); }
     107void    ?{}( thing456 & ) {  printf( "custom ctor\n"); }
    108108void    ?{}( thing456 &, thing456 ) = void;
    109109thing456 & ?=?( thing456 &, thing456 ) = void;
    110 void   ^?{}( thing456 & this ) {  printf( "custom dtor\n"); }
     110void   ^?{}( thing456 & ) {  printf( "custom dtor\n"); }
    111111
    112112struct wrapper1 { thing456 x; };
Note: See TracChangeset for help on using the changeset viewer.