mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-03-07 14:13:58 -04:00
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. |
||
---|---|---|
.. | ||
BetterStream.h | ||
dsm.cpp | ||
dsm.h | ||
ftoa_engine.cpp | ||
ftoa_engine.h | ||
functor.h | ||
getopt_cpp.cpp | ||
getopt_cpp.h | ||
print_vprintf.cpp | ||
print_vprintf.h | ||
Print.cpp | ||
Print.h | ||
RingBuffer.cpp | ||
RingBuffer.h | ||
Socket.cpp | ||
Socket.h | ||
Stream.h | ||
utoa_invert.cpp | ||
xtoa_fast.h |