97022a4161
Fix warning that reveals a real bug: In file included from libraries/AP_HAL_Linux/UARTDriver.cpp:25:0: libraries/AP_HAL_Linux/UARTDriver.cpp: In member function 'virtual bool Linux::UARTDriver::tx_pending()': libraries/AP_HAL/utility/RingBuffer.h:21:35: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses] #define BUF_EMPTY(buf) buf##_head == buf##_tail ^ libraries/AP_HAL_Linux/UARTDriver.cpp:355:13: note: in expansion of macro 'BUF_EMPTY' return !BUF_EMPTY(_writebuf); The problem is when there's a ! operator: without the parenthesis we would actually be doing return !_write_buf_head == _write_buf_tail which is not what we want. |
||
---|---|---|
.. | ||
examples | ||
utility | ||
AnalogIn.h | ||
AP_HAL_Boards.h | ||
AP_HAL_Macros.h | ||
AP_HAL_Main.h | ||
AP_HAL_Namespace.h | ||
AP_HAL.h | ||
GPIO.h | ||
HAL.cpp | ||
HAL.h | ||
I2CDriver.h | ||
OpticalFlow.h | ||
RCInput.h | ||
RCOutput.h | ||
Scheduler.h | ||
Semaphores.h | ||
SPIDriver.h | ||
Storage.h | ||
system.h | ||
UARTDriver.cpp | ||
UARTDriver.h | ||
Util.cpp | ||
Util.h |