From 72e137ea7d4912099b469f6a3b0f8913a1ac5a65 Mon Sep 17 00:00:00 2001 From: Brad King Date: Fri, 4 Apr 2014 11:47:04 -0400 Subject: Re-word comment on unreachable return statements Do not use the word "warning" in the comment because CTest launchers match it and CTestCustom.cmake.in does not suppress it. --- Source/cmCommandArgumentLexer.cxx | 2 +- Source/cmDependsJavaLexer.cxx | 2 +- Source/cmExprLexer.cxx | 2 +- Source/cmSystemTools.cxx | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/cmCommandArgumentLexer.cxx b/Source/cmCommandArgumentLexer.cxx index e62e53e..e23ef8a 100644 --- a/Source/cmCommandArgumentLexer.cxx +++ b/Source/cmCommandArgumentLexer.cxx @@ -1069,7 +1069,7 @@ case YY_STATE_EOF(NOESCAPES): "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ -return 0; /* this should not happend but it should silence a warning */ +return 0; /* this should not happen but it quiets some compilers */ } /* end of cmCommandArgument_yylex */ /* yy_get_next_buffer - try to read in a new buffer diff --git a/Source/cmDependsJavaLexer.cxx b/Source/cmDependsJavaLexer.cxx index 1e505a5..f7676d9 100644 --- a/Source/cmDependsJavaLexer.cxx +++ b/Source/cmDependsJavaLexer.cxx @@ -1591,7 +1591,7 @@ case YY_STATE_EOF(string): "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ -return 0; /* this should not happen but it silences a warning*/ +return 0; /* this should not happen but it quiets some compilers */ } /* end of cmDependsJava_yylex */ /* yy_get_next_buffer - try to read in a new buffer diff --git a/Source/cmExprLexer.cxx b/Source/cmExprLexer.cxx index aa384cd..4704f03 100644 --- a/Source/cmExprLexer.cxx +++ b/Source/cmExprLexer.cxx @@ -976,7 +976,7 @@ case YY_STATE_EOF(INITIAL): "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ -return 0; /* this should not happen but it silences a warning*/ +return 0; /* this should not happen but it quiets some compilers */ } /* end of cmExpr_yylex */ /* yy_get_next_buffer - try to read in a new buffer diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index c1c33f2..635e31c 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -1617,7 +1617,7 @@ long copy_data(struct archive *ar, struct archive *aw) } } #if !defined(__clang__) - return r; /* this should not happen but it silences a warning */ + return r; /* this should not happen but it quiets some compilers */ #endif } -- cgit v0.12 From a9fe65c316dbfebe5b69269cf50659fe1aa5919d Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 8 Apr 2014 08:48:08 -0400 Subject: cmSystemTools: Remove unreachable return on HP compiler Follow up commit 1de08685 (cmSystemTools: Restore unreachable return to silence warnings, 2014-04-02) by excluding the unreachable return on the HP compiler as well as Clang. Both recognize that it is unreachable and warn. --- Source/cmSystemTools.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index 635e31c..c27b561 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -1616,7 +1616,7 @@ long copy_data(struct archive *ar, struct archive *aw) return (r); } } -#if !defined(__clang__) +#if !defined(__clang__) && !defined(__HP_aCC) return r; /* this should not happen but it quiets some compilers */ #endif } -- cgit v0.12