diff options
-rw-r--r-- | lib/AST/Expr.cpp | 3 | ||||
-rw-r--r-- | lib/Sema/SemaExpr.cpp | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/AST/Expr.cpp b/lib/AST/Expr.cpp index 92e901a93b..9c9c7baf8e 100644 --- a/lib/AST/Expr.cpp +++ b/lib/AST/Expr.cpp @@ -500,7 +500,7 @@ double FloatingLiteral::getValueAsApproximateDouble() const { } int StringLiteral::mapCharByteWidth(TargetInfo const &target,StringKind k) { - int CharByteWidth; + int CharByteWidth = 0; switch(k) { case Ascii: case UTF8: @@ -514,6 +514,7 @@ int StringLiteral::mapCharByteWidth(TargetInfo const &target,StringKind k) { break; case UTF32: CharByteWidth = target.getChar32Width(); + break; } assert((CharByteWidth & 7) == 0 && "Assumes character size is byte multiple"); CharByteWidth /= 8; diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp index 56debcf208..027ec73d49 100644 --- a/lib/Sema/SemaExpr.cpp +++ b/lib/Sema/SemaExpr.cpp @@ -9000,7 +9000,7 @@ bool Sema::DiagnoseAssignmentResult(AssignConvertType ConvTy, // Decode the result (notice that AST's are still created for extensions). bool CheckInferredResultType = false; bool isInvalid = false; - unsigned DiagKind; + unsigned DiagKind = 0; FixItHint Hint; ConversionFixItGenerator ConvHints; bool MayHaveConvFixit = false; |