summaryrefslogtreecommitdiffstats
path: root/Templates
diff options
context:
space:
mode:
authorSean McBride <sean@rogue-research.com>2014-03-28 15:10:37 (GMT)
committerBrad King <brad.king@kitware.com>2014-03-31 13:41:05 (GMT)
commit50ca77f4a03b05c380c923f737e0b3aa00a4cf7d (patch)
tree5ae8fd4771b79f0eb00c0829923bd833934ec39c /Templates
parenta48de7d8506325e7f27c9dada578744e1ff3fb35 (diff)
downloadCMake-50ca77f4a03b05c380c923f737e0b3aa00a4cf7d.zip
CMake-50ca77f4a03b05c380c923f737e0b3aa00a4cf7d.tar.gz
CMake-50ca77f4a03b05c380c923f737e0b3aa00a4cf7d.tar.bz2
create_test_sourcelist: Initialize variable at declaration
Clang -Wconditional-uninitialized warns otherwise.
Diffstat (limited to 'Templates')
-rw-r--r--Templates/TestDriver.cxx.in3
1 files changed, 1 insertions, 2 deletions
diff --git a/Templates/TestDriver.cxx.in b/Templates/TestDriver.cxx.in
index 82537ef..0e0a872 100644
--- a/Templates/TestDriver.cxx.in
+++ b/Templates/TestDriver.cxx.in
@@ -58,7 +58,7 @@ static char* lowercase(const char *string)
int main(int ac, char *av[])
{
- int i, NumTests, testNum, partial_match;
+ int i, NumTests, testNum = 0, partial_match;
char *arg, *test_name;
int count;
int testToRun = -1;
@@ -81,7 +81,6 @@ int main(int ac, char *av[])
}
printf("To run a test, enter the test number: ");
fflush(stdout);
- testNum = 0;
if( scanf("%d", &testNum) != 1 )
{
printf("Couldn't parse that input as a number\n");