[Libreoffice-commits] core.git: compilerplugins/clang l10ntools/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Feb 28 15:44:07 UTC 2019


 compilerplugins/clang/externandnotdefined.cxx |    2 +-
 l10ntools/source/cfglex.l                     |    9 ---------
 l10ntools/source/xrmlex.l                     |   12 ------------
 3 files changed, 1 insertion(+), 22 deletions(-)

New commits:
commit b31e2b69607f80c1e2e9b20ce7e687387cd2db17
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Wed Feb 27 15:23:32 2019 +0100
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Thu Feb 28 16:43:42 2019 +0100

    Remove unused YYWarning functions (cargo cult?)
    
    Change-Id: I9cb03530150ee35bdaee4920dd2e818007a0a658
    Reviewed-on: https://gerrit.libreoffice.org/68469
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/compilerplugins/clang/externandnotdefined.cxx b/compilerplugins/clang/externandnotdefined.cxx
index faf6bffb136c..afd77abe7bda 100644
--- a/compilerplugins/clang/externandnotdefined.cxx
+++ b/compilerplugins/clang/externandnotdefined.cxx
@@ -46,7 +46,7 @@ bool ExternAndNotDefined::VisitFunctionDecl(const FunctionDecl * functionDecl) {
     }
     // this is the bison/flex C API, it has to be defined this way
     std::string functionName = functionDecl->getNameAsString();
-    if (functionName == "yyerror" || functionName == "YYWarning" || functionName == "yyparse" || functionName == "yylex") {
+    if (functionName == "yyerror" || functionName == "yyparse" || functionName == "yylex") {
         return true;
     }
     // see vcl/unx/gtk/app/gtksys.cxx, typename conflicts prevent using the right include
diff --git a/l10ntools/source/cfglex.l b/l10ntools/source/cfglex.l
index f5fc2280dfe2..bea165204338 100644
--- a/l10ntools/source/cfglex.l
+++ b/l10ntools/source/cfglex.l
@@ -146,15 +146,6 @@ int yywrap(void)
 }
 
 /*****************************************************************************/
-void YYWarning( const char *s )
-/*****************************************************************************/
-{
-    /* write warning to stderr */
-    fprintf( stderr,
-        "Warning: \"%s\" in line %d, column %d: \"%s\"\n", s, yylineno, yycolumn, yytext  );
-}
-
-/*****************************************************************************/
 void yyerror ( const char *s )
 /*****************************************************************************/
 {
diff --git a/l10ntools/source/xrmlex.l b/l10ntools/source/xrmlex.l
index c4d18337c5ad..41a19f279cf2 100644
--- a/l10ntools/source/xrmlex.l
+++ b/l10ntools/source/xrmlex.l
@@ -47,9 +47,6 @@
 
 #define YY_NO_UNISTD_H
 
-/* forwards */
-void YYWarning();
-
 static int bText=0;
 %}
 
@@ -177,15 +174,6 @@ int yywrap(void)
 }
 
 /*****************************************************************************/
-void YYWarning( const char *s )
-/*****************************************************************************/
-{
-    /* write warning to stderr */
-    fprintf( stderr,
-        "Warning: \"%s\" in line %d: \"%s\"\n", s, yylineno, yytext  );
-}
-
-/*****************************************************************************/
 void yyerror ( const char *s )
 /*****************************************************************************/
 {


More information about the Libreoffice-commits mailing list