summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYaron Keren <yaron.keren@gmail.com>2014-12-12 11:07:51 +0000
committerYaron Keren <yaron.keren@gmail.com>2014-12-12 11:07:51 +0000
commit5cb121d4380d61bfb10f0e2962a62b4c2c410179 (patch)
tree2d1007dc3a338a41174aa285010447e4b69ba90e
parent961f43fb70f65a2697f67c6857587608a888e6cb (diff)
downloadbcm5719-llvm-5cb121d4380d61bfb10f0e2962a62b4c2c410179.tar.gz
bcm5719-llvm-5cb121d4380d61bfb10f0e2962a62b4c2c410179.zip
Silence gcc 4.9.1 warning 'xyz' is used uninitialized in this function.
In release builds this is actually possible as without asserts there is no testing of the actual read bytes and the variables could be partially uninitialized. llvm-svn: 224114
-rw-r--r--llvm/tools/lli/ChildTarget/ChildTarget.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/llvm/tools/lli/ChildTarget/ChildTarget.cpp b/llvm/tools/lli/ChildTarget/ChildTarget.cpp
index 0d71b17c63d..6c537d47df3 100644
--- a/llvm/tools/lli/ChildTarget/ChildTarget.cpp
+++ b/llvm/tools/lli/ChildTarget/ChildTarget.cpp
@@ -97,15 +97,15 @@ void LLIChildTarget::handleMessage(LLIMessageType messageType) {
// Incoming message handlers
void LLIChildTarget::handleAllocateSpace() {
// Read and verify the message data size.
- uint32_t DataSize;
+ uint32_t DataSize = 0;
int rc = ReadBytes(&DataSize, 4);
(void)rc;
assert(rc == 4);
assert(DataSize == 8);
// Read the message arguments.
- uint32_t Alignment;
- uint32_t AllocSize;
+ uint32_t Alignment = 0;
+ uint32_t AllocSize = 0;
rc = ReadBytes(&Alignment, 4);
assert(rc == 4);
rc = ReadBytes(&AllocSize, 4);
@@ -121,13 +121,13 @@ void LLIChildTarget::handleAllocateSpace() {
void LLIChildTarget::handleLoadSection(bool IsCode) {
// Read the message data size.
- uint32_t DataSize;
+ uint32_t DataSize = 0;
int rc = ReadBytes(&DataSize, 4);
(void)rc;
assert(rc == 4);
// Read the target load address.
- uint64_t Addr;
+ uint64_t Addr = 0;
rc = ReadBytes(&Addr, 8);
assert(rc == 8);
size_t BufferSize = DataSize - 8;
@@ -150,14 +150,14 @@ void LLIChildTarget::handleLoadSection(bool IsCode) {
void LLIChildTarget::handleExecute() {
// Read the message data size.
- uint32_t DataSize;
+ uint32_t DataSize = 0;
int rc = ReadBytes(&DataSize, 4);
(void)rc;
assert(rc == 4);
assert(DataSize == 8);
// Read the target address.
- uint64_t Addr;
+ uint64_t Addr = 0;
rc = ReadBytes(&Addr, 8);
assert(rc == 8);
OpenPOWER on IntegriCloud