Changeset 35cc6d4 for src/GenPoly


Ignore:
Timestamp:
Dec 12, 2024, 4:35:32 PM (6 days ago)
Author:
Michael Brooks <mlbrooks@…>
Branches:
master
Children:
8ee211d
Parents:
f979f0ba
Message:

Mitigate several unused-declaration warnings in generated code.

See tests/nowarn/unused for the specific cases.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/GenPoly/Box.cpp

    rf979f0ba r35cc6d4  
    8686                        makeLayoutCType()
    8787                ) );
    88                 params.emplace_back( new ast::ObjectDecl(
     88                auto alignParam = new ast::ObjectDecl(
    8989                        sizedParam->location,
    9090                        alignofName( paramName ),
    9191                        makeLayoutCType()
    92                 ) );
     92                );
     93                alignParam->attributes.push_back( new ast::Attribute( "unused" ) );
     94                params.emplace_back( alignParam );
    9395        }
    9496}
Note: See TracChangeset for help on using the changeset viewer.