فهرست منبع

Merge topic 'clang-warnings'

8c9c4fe1 Remove 'return' statements that can never be reached
50ca77f4 create_test_sourcelist: Initialize variable at declaration
Brad King 11 سال پیش
والد
کامیت
242e13bfe6
3فایلهای تغییر یافته به همراه1 افزوده شده و 4 حذف شده
  1. 0 1
      Source/CursesDialog/cmCursesOptionsWidget.cxx
  2. 0 1
      Source/cmSystemTools.cxx
  3. 1 2
      Templates/TestDriver.cxx.in

+ 0 - 1
Source/CursesDialog/cmCursesOptionsWidget.cxx

@@ -59,7 +59,6 @@ bool cmCursesOptionsWidget::HandleInput(int& key, cmCursesMainForm*, WINDOW* w)
     {
     {
     return false;
     return false;
     }
     }
-  return false;
 }
 }
 
 
 void cmCursesOptionsWidget::AddOption(std::string const & option )
 void cmCursesOptionsWidget::AddOption(std::string const & option )

+ 0 - 1
Source/cmSystemTools.cxx

@@ -1616,7 +1616,6 @@ long copy_data(struct archive *ar, struct archive *aw)
       return (r);
       return (r);
       }
       }
     }
     }
-  return r;
 }
 }
 
 
 bool extract_tar(const char* outFileName, bool verbose,
 bool extract_tar(const char* outFileName, bool verbose,

+ 1 - 2
Templates/TestDriver.cxx.in

@@ -58,7 +58,7 @@ static char* lowercase(const char *string)
 
 
 int main(int ac, char *av[])
 int main(int ac, char *av[])
 {
 {
-  int i, NumTests, testNum, partial_match;
+  int i, NumTests, testNum = 0, partial_match;
   char *arg, *test_name;
   char *arg, *test_name;
   int count;
   int count;
   int testToRun = -1;
   int testToRun = -1;
@@ -81,7 +81,6 @@ int main(int ac, char *av[])
       }
       }
     printf("To run a test, enter the test number: ");
     printf("To run a test, enter the test number: ");
     fflush(stdout);
     fflush(stdout);
-    testNum = 0;
     if( scanf("%d", &testNum) != 1 )
     if( scanf("%d", &testNum) != 1 )
       {
       {
       printf("Couldn't parse that input as a number\n");
       printf("Couldn't parse that input as a number\n");