Skip to content

Commit c39e449

Browse files
committed
Fix the -Wunused-parameter build-time warning.
The methods of the `AstVisitor` base class defines interface only and have no implementation. These should be marked as `[[maybe_unused]]` to prevent propagate the build warnings. Signed-off-by: Igor Kononenko <[email protected]>
1 parent e8e8d43 commit c39e449

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ast/cxx_visitor.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ def end_file(self):
3838
def start_type(self, name):
3939
titleName = title(name)
4040
camelName = camel(titleName)
41-
print ' virtual bool visit%s(const %s &%s) { return true; }' % (
41+
print ' virtual bool visit%s([[maybe_unused]] const %s &%s) { return true; }' % (
4242
titleName,
4343
titleName,
4444
camelName)
45-
print ' virtual void endVisit%s(const %s &%s) { }' % (
45+
print ' virtual void endVisit%s([[maybe_unused]] const %s &%s) { }' % (
4646
titleName,
4747
titleName,
4848
camelName)

0 commit comments

Comments
 (0)