diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-01-04 16:23:30 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-01-04 16:26:46 +0100 |
commit | 9389f7bc1c78231cea0921646c10ff5cdb5a257e (patch) | |
tree | 1314501b11630bbd38381bc36b6ed25e4c4518ee | |
parent | 30dd4ac3a8aa6481d20cd7b790cd807127969f8e (diff) |
Fix loplugin warnings in sqlflex.l
(Normally hidden by T_LEXFLAGS containing -L in connectivity/Library_dbtools.mk
suppressing #line directives; some loplugin:literaltoboolconversion warning
would remain in a flex-provided occurrence of ECHO that is apparently not
properly prefixed by #line at least with flex 2.6.0.)
Change-Id: Id5693d6bd9e5b565dd9820e3cbea8e88e7967dd5
-rw-r--r-- | connectivity/source/parse/sqlflex.l | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/connectivity/source/parse/sqlflex.l b/connectivity/source/parse/sqlflex.l index 2a81812c95ab..84edfd9b928e 100644 --- a/connectivity/source/parse/sqlflex.l +++ b/connectivity/source/parse/sqlflex.l @@ -30,8 +30,8 @@ #include <connectivity/internalnode.hxx> -#ifndef _CONNECTIVITY_SQLYACC_HXX -#define _CONNECTIVITY_SQLYACC_HXX +#ifndef INCLUDED_CONNECTIVITY_SOURCE_PARSE_SQLFLEX_L +#define INCLUDED_CONNECTIVITY_SOURCE_PARSE_SQLFLEX_L #ifndef SQLYYDEBUG #define SQLYYDEBUG 1 @@ -66,7 +66,7 @@ static sal_Int32 gatherString(int delim, sal_Int32 nTyp); static sal_Int32 gatherName(const sal_Char*); static sal_Int32 gatherNamePre(const sal_Char* ); // has to be set before the parser starts -OSQLScanner* xxx_pGLOBAL_SQLSCAN = NULL; +OSQLScanner* xxx_pGLOBAL_SQLSCAN = nullptr; #define SQL_NEW_NODE(text, token) \ SQLyylval.pParseNode = new OSQLInternalNode(text, token); @@ -688,9 +688,9 @@ using namespace connectivity; static bool IN_SQLyyerror; //------------------------------------------------------------------------------ OSQLScanner::OSQLScanner() - : m_pContext(NULL) + : m_pContext(nullptr) , m_nCurrentPos(0) - , m_bInternational(sal_False) + , m_bInternational(false) , m_nRule(0) // 0 is INITIAL { IN_SQLyyerror = false; @@ -712,11 +712,11 @@ void OSQLScanner::SQLyyerror(char const *fmt) m_sErrorMessage = ::rtl::OUString(fmt,strlen(fmt),RTL_TEXTENCODING_UTF8); if (m_nCurrentPos < m_sStatement.getLength()) { - m_sErrorMessage += ::rtl::OUString(": "); + m_sErrorMessage += ": "; ::rtl::OUString aError; static sal_Int32 BUFFERSIZE = 256; - static sal_Char* Buffer = 0; + static sal_Char* Buffer = nullptr; if(!Buffer) Buffer = new sal_Char[BUFFERSIZE]; @@ -754,7 +754,7 @@ void OSQLScanner::SQLyyerror(char const *fmt) } m_sErrorMessage += aError; delete[] Buffer; - Buffer = NULL; + Buffer = nullptr; } IN_SQLyyerror = false; YY_FLUSH_BUFFER; @@ -794,7 +794,7 @@ sal_Int32 OSQLScanner::GetDATERule() { return DATE; } sal_Int32 OSQLScanner::GetSTRINGRule() { return STRING; } void OSQLScanner::setScanner(bool _bNull) { - xxx_pGLOBAL_SQLSCAN = _bNull ? NULL : this; + xxx_pGLOBAL_SQLSCAN = _bNull ? nullptr : this; } sal_Int32 OSQLScanner::SQLlex() { |