Make sure a variable is initialized before use to clean up a warning from
authorReid Spencer <rspencer@reidspencer.com>
Sat, 18 Jun 2005 16:53:27 +0000 (16:53 +0000)
committerReid Spencer <rspencer@reidspencer.com>
Sat, 18 Jun 2005 16:53:27 +0000 (16:53 +0000)
GCC 4.0.0 in release build.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22248 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Support/CommandLine.h

index c5e909d8a2663db9083eb7a0d4651ae2b01667cb..9cad99f4415f2cc71fa7e6c31cf17a40b596c59d 100644 (file)
@@ -894,7 +894,8 @@ class list : public Option, public list_storage<DataType, Storage> {
 
   virtual bool handleOccurrence(unsigned pos, const char *ArgName,
                                 const std::string &Arg) {
-    typename ParserClass::parser_data_type Val;
+    typename ParserClass::parser_data_type Val =
+      typename ParserClass::parser_data_type();
     if (Parser.parse(*this, ArgName, Arg, Val))
       return true;  // Parse Error!
     addValue(Val);