summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ipc/ipc_message.cc2
-rw-r--r--ipc/ipc_message.h1
2 files changed, 3 insertions, 0 deletions
diff --git a/ipc/ipc_message.cc b/ipc/ipc_message.cc
index 7e5b77b..a532a8d 100644
--- a/ipc/ipc_message.cc
+++ b/ipc/ipc_message.cc
@@ -23,6 +23,7 @@ Message::Message()
header()->routing = header()->type = header()->flags = 0;
#if defined(OS_POSIX)
header()->num_fds = 0;
+ header()->pad = 0;
#endif
InitLoggingVariables();
}
@@ -34,6 +35,7 @@ Message::Message(int32 routing_id, uint32 type, PriorityValue priority)
header()->flags = priority;
#if defined(OS_POSIX)
header()->num_fds = 0;
+ header()->pad = 0;
#endif
InitLoggingVariables();
}
diff --git a/ipc/ipc_message.h b/ipc/ipc_message.h
index 8268fce..a9ad9a4 100644
--- a/ipc/ipc_message.h
+++ b/ipc/ipc_message.h
@@ -223,6 +223,7 @@ class Message : public Pickle {
uint32 flags; // specifies control flags for the message
#if defined(OS_POSIX)
uint16 num_fds; // the number of descriptors included with this message
+ uint16 pad; // explicitly initialize this to appease valgrind
#endif
};
#pragma pack(pop)