From 153033d6b77ecac41dfc8cf6694620742d9cd464 Mon Sep 17 00:00:00 2001 From: guodongqi Date: Sun, 24 Apr 2022 09:58:28 +0800 Subject: [PATCH] fix: clear daily warnings Signed-off-by: guodongqi --- tools/hc-gen/src/lexer.h | 2 +- tools/hc-gen/src/parser.cpp | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/hc-gen/src/lexer.h b/tools/hc-gen/src/lexer.h index c9c6aa52..e745f99e 100644 --- a/tools/hc-gen/src/lexer.h +++ b/tools/hc-gen/src/lexer.h @@ -80,7 +80,7 @@ private: int32_t lineLoc_; }; -std::ostream &operator<<(std::ostream &stream, const Lexer &lexer); +std::ostream &operator<<(std::ostream &stream, const Lexer &p); } // namespace Hardware } // namespace OHOS diff --git a/tools/hc-gen/src/parser.cpp b/tools/hc-gen/src/parser.cpp index dd1ccf5c..1b0ac1b4 100644 --- a/tools/hc-gen/src/parser.cpp +++ b/tools/hc-gen/src/parser.cpp @@ -15,7 +15,7 @@ using namespace OHOS::Hardware; -Parser::Parser() : errno_(NOERR) {} +Parser::Parser() : errno_(NOERR), current_() {} void Parser::CleanError() { @@ -319,7 +319,7 @@ std::shared_ptr Parser::ParseNodeWithRef(Token name) return node; } -/* started with NodePath on gramme : LITERAL ':' NodePath '{' ConfigTermList '}'*/ +/* started with NodePath on gramme : LITERAL ':' NodePath '{' ConfigTermList '}' */ std::shared_ptr Parser::ParseNodeCopy(Token &name) { auto nodePath = current_.strval; @@ -336,7 +336,7 @@ std::shared_ptr Parser::ParseNodeCopy(Token &name) return node; } -/* started with & on gramme : LITERAL ':' '&' NodePath '{' ConfigTermList '}'*/ +/* started with & on gramme : LITERAL ':' '&' NodePath '{' ConfigTermList '}' */ std::shared_ptr Parser::ParseNodeRef(Token &name) { if (!lexer_.Lex(current_) || (current_ != LITERAL && current_ != REF_PATH)) { @@ -355,7 +355,7 @@ std::shared_ptr Parser::ParseNodeRef(Token &name) return node; } -/* started with DELETE on gramme : LITERAL ':' DELETE '{' ConfigTermList '}'*/ +/* started with DELETE on gramme : LITERAL ':' DELETE '{' ConfigTermList '}' */ std::shared_ptr Parser::ParseNodeDelete(Token &name) { auto node = ParseNode(name); @@ -369,7 +369,7 @@ std::shared_ptr Parser::ParseNodeDelete(Token &name) return node; } -/* started with 2th ':' on gramme : LITERAL ':' ':' NodePath '{' ConfigTermList '}'*/ +/* started with 2th ':' on gramme : LITERAL ':' ':' NodePath '{' ConfigTermList '}' */ std::shared_ptr Parser::ParseNodeInherit(Token &name) { if (!lexer_.Lex(current_) || (current_ != LITERAL && current_ != REF_PATH)) {