From c58a23db1fe5272ad153719dfca77b6ab37a7751 Mon Sep 17 00:00:00 2001 From: Lalit Maganti Date: Fri, 13 Sep 2024 19:37:53 +0100 Subject: [PATCH] tp: use unused variable to fix compile in G3 Change-Id: If27c5707b16d46f6fcf86adffa41539671769945 --- .../perfetto_sql/preprocessor/perfetto_sql_preprocessor.cc | 1 + .../perfetto_sql/preprocessor/preprocessor_grammar.c | 2 +- .../perfetto_sql/preprocessor/preprocessor_grammar.y | 2 +- .../perfetto_sql/preprocessor/preprocessor_grammar_interface.h | 3 ++- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/trace_processor/perfetto_sql/preprocessor/perfetto_sql_preprocessor.cc b/src/trace_processor/perfetto_sql/preprocessor/perfetto_sql_preprocessor.cc index e664c259c7..510cb006a6 100644 --- a/src/trace_processor/perfetto_sql/preprocessor/perfetto_sql_preprocessor.cc +++ b/src/trace_processor/perfetto_sql/preprocessor/perfetto_sql_preprocessor.cc @@ -530,6 +530,7 @@ extern "C" PreprocessorGrammarApplyList* OnPreprocessorAppendApplyList( } extern "C" void OnPreprocessorFreeApplyList( + PreprocessorGrammarState*, PreprocessorGrammarApplyList* list) { delete list; } diff --git a/src/trace_processor/perfetto_sql/preprocessor/preprocessor_grammar.c b/src/trace_processor/perfetto_sql/preprocessor/preprocessor_grammar.c index 968abb75b4..ae5eefde10 100644 --- a/src/trace_processor/perfetto_sql/preprocessor/preprocessor_grammar.c +++ b/src/trace_processor/perfetto_sql/preprocessor/preprocessor_grammar.c @@ -540,7 +540,7 @@ static void yy_destructor( /********* Begin destructor definitions ***************************************/ case 17: /* applylist */ { - OnPreprocessorFreeApplyList((yypminor->yy2)); + OnPreprocessorFreeApplyList(state, (yypminor->yy2)); } break; /********* End destructor definitions *****************************************/ diff --git a/src/trace_processor/perfetto_sql/preprocessor/preprocessor_grammar.y b/src/trace_processor/perfetto_sql/preprocessor/preprocessor_grammar.y index 85966c96d8..cdfa821d60 100644 --- a/src/trace_processor/perfetto_sql/preprocessor/preprocessor_grammar.y +++ b/src/trace_processor/perfetto_sql/preprocessor/preprocessor_grammar.y @@ -48,7 +48,7 @@ apply ::= APPLY COMMA|AND(J) TRUE|FALSE(P) ID(X) LP applylist(Y) RP LP applylist } %type applylist {struct PreprocessorGrammarApplyList*} -%destructor applylist { OnPreprocessorFreeApplyList($$); } +%destructor applylist { OnPreprocessorFreeApplyList(state, $$); } applylist(A) ::= applylist(F) COMMA tokenlist(X). { A = OnPreprocessorAppendApplyList(F, &X); } diff --git a/src/trace_processor/perfetto_sql/preprocessor/preprocessor_grammar_interface.h b/src/trace_processor/perfetto_sql/preprocessor/preprocessor_grammar_interface.h index 315d97dfa5..c69f09574c 100644 --- a/src/trace_processor/perfetto_sql/preprocessor/preprocessor_grammar_interface.h +++ b/src/trace_processor/perfetto_sql/preprocessor/preprocessor_grammar_interface.h @@ -79,7 +79,8 @@ struct PreprocessorGrammarApplyList* OnPreprocessorCreateApplyList(); struct PreprocessorGrammarApplyList* OnPreprocessorAppendApplyList( struct PreprocessorGrammarApplyList*, struct PreprocessorGrammarTokenBounds*); -void OnPreprocessorFreeApplyList(struct PreprocessorGrammarApplyList*); +void OnPreprocessorFreeApplyList(struct PreprocessorGrammarState*, + struct PreprocessorGrammarApplyList*); #ifdef __cplusplus }