[llvm-commits] [llvm] r120916 - /llvm/trunk/lib/Support/PathV2.cpp

Bill Wendling isanbard at gmail.com
Sat Dec 4 12:20:34 PST 2010


Author: void
Date: Sat Dec  4 14:20:34 2010
New Revision: 120916

URL: http://llvm.org/viewvc/llvm-project?rev=120916&view=rev
Log:
Silence 'may be used uninitialized in this function' warnings. Static analysis
may determine that they cannot be used uninitialized. But that might be a bit
too much for the compiler to determine.

Modified:
    llvm/trunk/lib/Support/PathV2.cpp

Modified: llvm/trunk/lib/Support/PathV2.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/PathV2.cpp?rev=120916&r1=120915&r2=120916&view=diff
==============================================================================
--- llvm/trunk/lib/Support/PathV2.cpp (original)
+++ llvm/trunk/lib/Support/PathV2.cpp Sat Dec  4 14:20:34 2010
@@ -400,7 +400,7 @@
                                                   i != e; ++i) {
     bool path_has_sep = !path.empty() && is_separator(path[path.size() - 1]);
     bool component_has_sep = !i->empty() && is_separator((*i)[0]);
-    bool is_root_name;
+    bool is_root_name = false;
     if (error_code ec = has_root_name(*i, is_root_name)) return ec;
 
     if (path_has_sep) {
@@ -427,7 +427,7 @@
 error_code make_absolute(SmallVectorImpl<char> &path) {
   StringRef p(path.data(), path.size());
 
-  bool rootName, rootDirectory;
+  bool rootName = false, rootDirectory = false;
   if (error_code ec = has_root_name(p, rootName)) return ec;
   if (error_code ec = has_root_directory(p, rootDirectory)) return ec;
 





More information about the llvm-commits mailing list