diff options
author | 2017-03-27 18:50:24 +0200 | |
---|---|---|
committer | 2017-04-11 12:41:41 +0200 | |
commit | 17f087412b104b8ff96814066b54597ff6082649 (patch) | |
tree | 7eaa76842c0afd1fa7dd7a6fbd097c6cd942ce4b /src/can | |
parent | 5ecd8c0e9dcc58a04cfed2de2493ad973057b09b (diff) |
Erase compilation WARNING.
Useless tests and type cast about numbers.
Change-Id: I6fe13b7dfec8529520730f83e83d2dd3da3a674c
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'src/can')
-rw-r--r-- | src/can/can-bus.cpp | 2 | ||||
-rw-r--r-- | src/can/can-decoder.cpp | 6 | ||||
-rw-r--r-- | src/can/can-message.cpp | 2 |
3 files changed, 2 insertions, 8 deletions
diff --git a/src/can/can-bus.cpp b/src/can/can-bus.cpp index cfb9d86..e799233 100644 --- a/src/can/can-bus.cpp +++ b/src/can/can-bus.cpp @@ -246,7 +246,7 @@ int can_bus_t::init_can_dev() } } - NOTICE(binder_interface, "Initialized %d/%d can bus device(s)", i, t); + NOTICE(binder_interface, "Initialized %d/%d can bus device(s)", i, (int)t); return 0; } ERROR(binder_interface, "init_can_dev: Error at CAN device initialization. No devices read from configuration file. Did you specify canbus JSON object ?"); diff --git a/src/can/can-decoder.cpp b/src/can/can-decoder.cpp index 467261a..8843059 100644 --- a/src/can/can-decoder.cpp +++ b/src/can/can-decoder.cpp @@ -152,12 +152,6 @@ openxc_DynamicField decoder_t::stateDecoder(can_signal_t& signal, openxc_DynamicField decoder_t::translateSignal(can_signal_t& signal, can_message_t& message, const std::vector<can_signal_t>& signals) { - if(&signal == nullptr || &message == nullptr) - { - openxc_DynamicField ret = {0, openxc_DynamicField_Type_BOOL, 0, "", 0, 0, 0, 0}; - return ret; - } - float value = decoder_t::parseSignalBitfield(signal, message); DEBUG(binder_interface, "translateSignal: Decoded message from parseSignalBitfield: %f", value); diff --git a/src/can/can-message.cpp b/src/can/can-message.cpp index af0d3f3..f61de67 100644 --- a/src/can/can-message.cpp +++ b/src/can/can-message.cpp @@ -234,7 +234,7 @@ can_message_t can_message_t::convert_from_canfd_frame(const struct canfd_frame& }; DEBUG(binder_interface, "convert_from_canfd_frame: Found id: %X, format: %X, length: %X, data %02X%02X%02X%02X%02X%02X%02X%02X", - id, format, length, data[0], data[1], data[2], data[3], data[4], data[5], data[6], data[7]); + id, (uint8_t)format, length, data[0], data[1], data[2], data[3], data[4], data[5], data[6], data[7]); } return can_message_t(maxdlen, id, length, format, rtr_flag, flags, data); |