From: Romain Forlot Date: Wed, 5 Jul 2017 16:36:30 +0000 (+0200) Subject: Fix: uninitialized variables. X-Git-Tag: 4.0.0~30 X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=commitdiff_plain;h=5124dc3dbf5df73529bd79d6457ee19148390e3c;p=apps%2Flow-level-can-service.git Fix: uninitialized variables. Change-Id: I1e506f225ce6f17836708c32106ce45c80150ee6 Signed-off-by: Romain Forlot --- diff --git a/low-can-binding/can/can-message.cpp b/low-can-binding/can/can-message.cpp index fe66936..8221e30 100644 --- a/low-can-binding/can/can-message.cpp +++ b/low-can-binding/can/can-message.cpp @@ -189,7 +189,7 @@ void can_message_t::set_format(const can_message_format_t new_format) /// @return A can_message_t object fully initialized with canfd_frame values. can_message_t can_message_t::convert_from_frame(const struct canfd_frame& frame, size_t nbytes, uint64_t timestamp) { - uint8_t maxdlen, length, flags = (uint8_t)NULL; + uint8_t maxdlen = 0, length = 0, flags = 0; uint32_t id; can_message_format_t format; bool rtr_flag; @@ -277,7 +277,7 @@ can_message_t can_message_t::convert_from_frame(const struct canfd_frame& frame, /// @return A can_message_t object fully initialized with can_frame values. can_message_t can_message_t::convert_from_frame(const struct can_frame& frame, size_t nbytes, uint64_t timestamp) { - uint8_t maxdlen, length, flags = (uint8_t)NULL; + uint8_t maxdlen = 0, length = 0, flags = 0; uint32_t id; can_message_format_t format; bool rtr_flag;