From 590a0c809e558f05d2a17bcd4ea7e4e4ba4e9125 Mon Sep 17 00:00:00 2001 From: Brad King Date: Fri, 12 Jun 2009 10:46:03 -0400 Subject: [PATCH] COMP: Remove useless assignment in Fortran lexer The generated Fortran dependency scanning lexer includes an assignment to a local variable that is unused. Borland warns, so we remove the assignment. --- Source/cmDependsFortranLexer.cxx | 2 +- Source/cmDependsFortranLexer.in.l | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/cmDependsFortranLexer.cxx b/Source/cmDependsFortranLexer.cxx index 655f29302..6653a98e3 100644 --- a/Source/cmDependsFortranLexer.cxx +++ b/Source/cmDependsFortranLexer.cxx @@ -655,6 +655,7 @@ Modify cmDependsFortranLexer.cxx: - remove TABs - remove "yyscanner" argument from these methods: yy_fatal_error, cmDependsFortran_yyalloc, cmDependsFortran_yyrealloc, cmDependsFortran_yyfree + - remove "yyscanner = NULL" from end of cmDependsFortran_yylex_destroy - remove all YY_BREAK lines occurring right after return statements - change while ( 1 ) to for(;;) @@ -2332,7 +2333,6 @@ int cmDependsFortran_yylex_destroy (yyscan_t yyscanner) /* Destroy the main struct (reentrant only). */ cmDependsFortran_yyfree ( yyscanner , yyscanner ); - yyscanner = NULL; return 0; } diff --git a/Source/cmDependsFortranLexer.in.l b/Source/cmDependsFortranLexer.in.l index 8cbec27f8..1433ac231 100644 --- a/Source/cmDependsFortranLexer.in.l +++ b/Source/cmDependsFortranLexer.in.l @@ -37,6 +37,7 @@ Modify cmDependsFortranLexer.cxx: - remove TABs - remove "yyscanner" argument from these methods: yy_fatal_error, cmDependsFortran_yyalloc, cmDependsFortran_yyrealloc, cmDependsFortran_yyfree + - remove "yyscanner = NULL" from end of cmDependsFortran_yylex_destroy - remove all YY_BREAK lines occurring right after return statements - change while ( 1 ) to for(;;)