mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-02 20:28:37 +08:00
CI: enable clang-tidy bugprone-unsafe-functions / cert-msc24-c (#26573)
Signed-off-by: kuralme <kuralme@protonmail.com>
This commit is contained in:
@@ -169,8 +169,6 @@ Checks: '*,
|
|||||||
-readability-redundant-member-init,
|
-readability-redundant-member-init,
|
||||||
-readability-reference-to-constructed-temporary,
|
-readability-reference-to-constructed-temporary,
|
||||||
-readability-simplify-boolean-expr,
|
-readability-simplify-boolean-expr,
|
||||||
-bugprone-unsafe-functions,
|
|
||||||
-cert-msc24-c,
|
|
||||||
-cert-msc32-c,
|
-cert-msc32-c,
|
||||||
-cert-msc33-c,
|
-cert-msc33-c,
|
||||||
-cert-msc51-cpp,
|
-cert-msc51-cpp,
|
||||||
|
|||||||
@@ -430,7 +430,7 @@ void Pxh::_setup_term()
|
|||||||
term.c_lflag &= ~ICANON;
|
term.c_lflag &= ~ICANON;
|
||||||
term.c_lflag &= ~ECHO;
|
term.c_lflag &= ~ECHO;
|
||||||
tcsetattr(0, TCSANOW, &term);
|
tcsetattr(0, TCSANOW, &term);
|
||||||
setbuf(stdin, nullptr);
|
(void)setvbuf(stdin, nullptr, _IONBF, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Pxh::_restore_term()
|
void Pxh::_restore_term()
|
||||||
|
|||||||
@@ -143,8 +143,8 @@ int px4_sem_timedwait(px4_sem_t *s, const struct timespec *abstime)
|
|||||||
errno = ret;
|
errno = ret;
|
||||||
|
|
||||||
if (ret != 0 && ret != ETIMEDOUT) {
|
if (ret != 0 && ret != ETIMEDOUT) {
|
||||||
setbuf(stdout, nullptr);
|
(void)setvbuf(stdout, nullptr, _IONBF, 0);
|
||||||
setbuf(stderr, nullptr);
|
(void)setvbuf(stderr, nullptr, _IONBF, 0);
|
||||||
const unsigned NAMELEN = 32;
|
const unsigned NAMELEN = 32;
|
||||||
char thread_name[NAMELEN] = {};
|
char thread_name[NAMELEN] = {};
|
||||||
(void)pthread_getname_np(pthread_self(), thread_name, NAMELEN);
|
(void)pthread_getname_np(pthread_self(), thread_name, NAMELEN);
|
||||||
|
|||||||
Reference in New Issue
Block a user