diff --git a/.clang-tidy b/.clang-tidy index fcd1faa706..6713228d7b 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -169,8 +169,6 @@ Checks: '*, -readability-redundant-member-init, -readability-reference-to-constructed-temporary, -readability-simplify-boolean-expr, - -bugprone-unsafe-functions, - -cert-msc24-c, -cert-msc32-c, -cert-msc33-c, -cert-msc51-cpp, diff --git a/platforms/posix/src/px4/common/px4_daemon/pxh.cpp b/platforms/posix/src/px4/common/px4_daemon/pxh.cpp index 8774facd71..262f1ae2c0 100644 --- a/platforms/posix/src/px4/common/px4_daemon/pxh.cpp +++ b/platforms/posix/src/px4/common/px4_daemon/pxh.cpp @@ -430,7 +430,7 @@ void Pxh::_setup_term() term.c_lflag &= ~ICANON; term.c_lflag &= ~ECHO; tcsetattr(0, TCSANOW, &term); - setbuf(stdin, nullptr); + (void)setvbuf(stdin, nullptr, _IONBF, 0); } void Pxh::_restore_term() diff --git a/platforms/posix/src/px4/common/px4_sem.cpp b/platforms/posix/src/px4/common/px4_sem.cpp index fd43ae0e85..492e019893 100644 --- a/platforms/posix/src/px4/common/px4_sem.cpp +++ b/platforms/posix/src/px4/common/px4_sem.cpp @@ -143,8 +143,8 @@ int px4_sem_timedwait(px4_sem_t *s, const struct timespec *abstime) errno = ret; if (ret != 0 && ret != ETIMEDOUT) { - setbuf(stdout, nullptr); - setbuf(stderr, nullptr); + (void)setvbuf(stdout, nullptr, _IONBF, 0); + (void)setvbuf(stderr, nullptr, _IONBF, 0); const unsigned NAMELEN = 32; char thread_name[NAMELEN] = {}; (void)pthread_getname_np(pthread_self(), thread_name, NAMELEN);