Просмотр исходного кода

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.
Brad King 16 лет назад
Родитель
Сommit
590a0c809e
2 измененных файлов с 2 добавлено и 1 удалено
  1. 1 1
      Source/cmDependsFortranLexer.cxx
  2. 1 0
      Source/cmDependsFortranLexer.in.l

+ 1 - 1
Source/cmDependsFortranLexer.cxx

@@ -655,6 +655,7 @@ Modify cmDependsFortranLexer.cxx:
   - remove TABs
   - remove TABs
   - remove "yyscanner" argument from these methods:
   - remove "yyscanner" argument from these methods:
       yy_fatal_error, cmDependsFortran_yyalloc, cmDependsFortran_yyrealloc, cmDependsFortran_yyfree
       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
   - remove all YY_BREAK lines occurring right after return statements
   - change while ( 1 ) to for(;;)
   - change while ( 1 ) to for(;;)
 
 
@@ -2332,7 +2333,6 @@ int cmDependsFortran_yylex_destroy  (yyscan_t yyscanner)
 
 
     /* Destroy the main struct (reentrant only). */
     /* Destroy the main struct (reentrant only). */
     cmDependsFortran_yyfree ( yyscanner , yyscanner );
     cmDependsFortran_yyfree ( yyscanner , yyscanner );
-    yyscanner = NULL;
     return 0;
     return 0;
 }
 }
 
 

+ 1 - 0
Source/cmDependsFortranLexer.in.l

@@ -37,6 +37,7 @@ Modify cmDependsFortranLexer.cxx:
   - remove TABs
   - remove TABs
   - remove "yyscanner" argument from these methods:
   - remove "yyscanner" argument from these methods:
       yy_fatal_error, cmDependsFortran_yyalloc, cmDependsFortran_yyrealloc, cmDependsFortran_yyfree
       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
   - remove all YY_BREAK lines occurring right after return statements
   - change while ( 1 ) to for(;;)
   - change while ( 1 ) to for(;;)