From: Cameron McInally Date: Tue, 7 Jan 2014 19:51:38 +0000 (+0000) Subject: Fix uninitialized variable warning in DataLayout. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=67cc1dc99595b8807d8c18ab4f3854bee3203982;p=oota-llvm.git Fix uninitialized variable warning in DataLayout. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198702 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/IR/DataLayout.cpp b/lib/IR/DataLayout.cpp index c9e95b40215..6f32be08c5b 100644 --- a/lib/IR/DataLayout.cpp +++ b/lib/IR/DataLayout.cpp @@ -205,9 +205,9 @@ static std::pair split(StringRef Str, char Separator) { return Split; } -/// Get an unsinged integer, including error checks. +/// Get an unsigned integer, including error checks. static unsigned getInt(StringRef R) { - unsigned Result; + unsigned Result = 0; bool error = R.getAsInteger(10, Result); (void)error; assert(!error && "not a number, or does not fit in an unsigned int"); return Result;