mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-21 01:12:11 +00:00
clang-tidy: enable hicpp-braces-around-statements and fix
This commit is contained in:
@@ -48,7 +48,6 @@ Checks: '*,
|
|||||||
-google-readability-todo,
|
-google-readability-todo,
|
||||||
-google-runtime-int,
|
-google-runtime-int,
|
||||||
-google-runtime-references,
|
-google-runtime-references,
|
||||||
-hicpp-braces-around-statements,
|
|
||||||
-hicpp-deprecated-headers,
|
-hicpp-deprecated-headers,
|
||||||
-hicpp-explicit-conversions,
|
-hicpp-explicit-conversions,
|
||||||
-hicpp-function-size,
|
-hicpp-function-size,
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ void sq_rem(sq_entry_t *node, sq_queue_t *queue)
|
|||||||
|
|
||||||
for (prev = (sq_entry_t *)queue->head;
|
for (prev = (sq_entry_t *)queue->head;
|
||||||
prev && prev->flink != node;
|
prev && prev->flink != node;
|
||||||
prev = prev->flink);
|
prev = prev->flink) {}
|
||||||
|
|
||||||
if (prev) {
|
if (prev) {
|
||||||
sq_remafter(prev, queue);
|
sq_remafter(prev, queue);
|
||||||
|
|||||||
@@ -1152,7 +1152,7 @@ void Logger::run()
|
|||||||
* And on linux this is quite accurate as well, but under NuttX it is not accurate,
|
* And on linux this is quite accurate as well, but under NuttX it is not accurate,
|
||||||
* because usleep() has only a granularity of CONFIG_MSEC_PER_TICK (=1ms).
|
* because usleep() has only a granularity of CONFIG_MSEC_PER_TICK (=1ms).
|
||||||
*/
|
*/
|
||||||
while (px4_sem_wait(&timer_callback_data.semaphore) != 0);
|
while (px4_sem_wait(&timer_callback_data.semaphore) != 0) {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -364,7 +364,7 @@ MavlinkFTP::_workList(PayloadHeader *payload, bool list_hidden)
|
|||||||
// move to the requested offset
|
// move to the requested offset
|
||||||
int requested_offset = payload->offset;
|
int requested_offset = payload->offset;
|
||||||
|
|
||||||
while (requested_offset-- > 0 && readdir(dp));
|
while (requested_offset-- > 0 && readdir(dp)) {}
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
errno = 0;
|
errno = 0;
|
||||||
|
|||||||
@@ -289,7 +289,7 @@ MavlinkParametersManager::send(const hrt_abstime t)
|
|||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
// Send while burst is not exceeded, we still have buffer space and still something to send
|
// Send while burst is not exceeded, we still have buffer space and still something to send
|
||||||
while ((i++ < max_num_to_send) && (_mavlink->get_free_tx_buf() >= get_size()) && send_params());
|
while ((i++ < max_num_to_send) && (_mavlink->get_free_tx_buf() >= get_size()) && send_params()) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
|||||||
Reference in New Issue
Block a user