[llvm-commits] CVS: llvm/include/llvm/Support/CommandLine.h

Reid Spencer reid at x10sys.com
Sat Jun 18 09:53:38 PDT 2005



Changes in directory llvm/include/llvm/Support:

CommandLine.h updated: 1.44 -> 1.45
---
Log message:

Make sure a variable is initialized before use to clean up a warning from
GCC 4.0.0 in release build.


---
Diffs of the changes:  (+2 -1)

 CommandLine.h |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)


Index: llvm/include/llvm/Support/CommandLine.h
diff -u llvm/include/llvm/Support/CommandLine.h:1.44 llvm/include/llvm/Support/CommandLine.h:1.45
--- llvm/include/llvm/Support/CommandLine.h:1.44	Fri Jun 17 08:20:15 2005
+++ llvm/include/llvm/Support/CommandLine.h	Sat Jun 18 11:53:27 2005
@@ -894,7 +894,8 @@
 
   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);






More information about the llvm-commits mailing list