From 330dab2fe337c628696b8f1e7c06999c598c5e57 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 8 Nov 2014 11:49:09 +1100 Subject: [PATCH] HAL_Linux: fixed some warnings --- libraries/AP_HAL_Linux/Storage_FRAM.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/AP_HAL_Linux/Storage_FRAM.cpp b/libraries/AP_HAL_Linux/Storage_FRAM.cpp index 9f1bbdc32c..266df81966 100644 --- a/libraries/AP_HAL_Linux/Storage_FRAM.cpp +++ b/libraries/AP_HAL_Linux/Storage_FRAM.cpp @@ -238,7 +238,7 @@ int8_t LinuxStorage_FRAM::_write_enable(bool enable) int8_t LinuxStorage_FRAM::_register_read( uint16_t addr, uint8_t opcode ) { - uint8_t tx[4] = {opcode, addr >> 8U, addr, 0}; + uint8_t tx[4] = {opcode, (uint8_t)((addr >> 8U)), (uint8_t)(addr & 0xFF), 0}; uint8_t rx[4]; if(transaction(tx, rx, 4) == -1){