From e19bdda13e3e80df5fde6b381848187979580ca7 Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Thu, 2 Jan 2014 17:44:33 -0700 Subject: [PATCH] fix uninitialized value warning in compile.cpp Clang was complaining that newIp might be used uninitialized at the bottom of our giant, unstructured compile loop, so I initialized it with a bogus value, which means it will at least fail consistently if Clang is right and there really is a path by which that code is reached without otherwise initializing newIp. --- src/compile.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compile.cpp b/src/compile.cpp index cfa1aef6c4..7028f69cca 100644 --- a/src/compile.cpp +++ b/src/compile.cpp @@ -4007,7 +4007,7 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp, unsigned stackSize = codeMaxStack(t, methodCode(t, context->method)); Stack stack(t); unsigned ip = initialIp; - unsigned newIp; + unsigned newIp = -1; stack.pushValue(Return); start: