From 52eb4c60143ccf54f2679cd1c61a16d257213af3 Mon Sep 17 00:00:00 2001 From: Matt Pharr Date: Tue, 14 Feb 2012 10:01:45 -0800 Subject: [PATCH] Fix warnings with Windows build --- llvmutil.cpp | 2 +- parse.yy | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/llvmutil.cpp b/llvmutil.cpp index e5c4785e..bbad2886 100644 --- a/llvmutil.cpp +++ b/llvmutil.cpp @@ -585,7 +585,7 @@ LLVMFlattenInsertChain(llvm::InsertElementInst *ie, int vectorWidth, llvm::dyn_cast(insertBase); Assert(cv != NULL); Assert(iOffset < (int)cv->getNumOperands()); - elements[iOffset] = cv->getOperand(iOffset); + elements[iOffset] = cv->getOperand((int32_t)iOffset); } } } diff --git a/parse.yy b/parse.yy index 5847d3e7..d2507884 100644 --- a/parse.yy +++ b/parse.yy @@ -481,15 +481,15 @@ new_expression : conditional_expression | rate_qualified_new rate_qualified_new_type { - $$ = new NewExpr($1, $2, NULL, NULL, @1, Union(@1, @2)); + $$ = new NewExpr((int32_t)$1, $2, NULL, NULL, @1, Union(@1, @2)); } | rate_qualified_new rate_qualified_new_type '(' initializer_list ')' { - $$ = new NewExpr($1, $2, $4, NULL, @1, Union(@1, @2)); + $$ = new NewExpr((int32_t)$1, $2, $4, NULL, @1, Union(@1, @2)); } | rate_qualified_new rate_qualified_new_type '[' expression ']' { - $$ = new NewExpr($1, $2, NULL, $4, @1, Union(@1, @4)); + $$ = new NewExpr((int32_t)$1, $2, NULL, $4, @1, Union(@1, @4)); } ;