Skip to content
Permalink
Browse files

Initialize m_buffer and e_buffer to zero to avoid uninitialized warni…

…ngs.
  • Loading branch information...
Ignacio Jaureguiberry
Ignacio Jaureguiberry committed Oct 18, 2017
1 parent d5e3c15 commit dacdf5a873a7a0e7e262cb67e63290c2463a7fd0
Showing with 3 additions and 0 deletions.
  1. +3 −0 cpp/src/Msg.cpp
@@ -81,6 +81,9 @@ Msg::Msg
m_expectedReply = _expectedReply ? _expectedReply : _function;
}

memset(m_buffer, 0x00, 256);
memset(e_buffer, 0x00, 256);

m_buffer[0] = SOF;
m_buffer[1] = 0; // Length of the following data, filled in during Finalize.
m_buffer[2] = _msgType;

0 comments on commit dacdf5a

Please sign in to comment.
You can’t perform that action at this time.