Skip to content

Commit fb521eb

Browse files
committed
decoder.h: warning cleanup
Fix a compiler warning about a possibly uninitialized variable (the compiler cannot prove that the variable is always initialized before use, even though the code logic guarantees it). Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
1 parent 2a4f864 commit fb521eb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/decoder.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ class RpcDecoder {
208208

209209
size_t bytes_checked = 0;
210210
size_t container_size;
211-
int type;
211+
int type = NO_MSG;
212212
MsgPack::Unpacker unpacker;
213213

214214
while (bytes_checked + offset < _bytes_stored){

0 commit comments

Comments
 (0)