mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-16 04:43:33 +08:00
clang-tidy: partially fix cppcoreguidelines-pro-type-reinterpret-cast
This commit is contained in:
@@ -190,7 +190,7 @@ void *LogWriterFile::run_helper(void *context)
|
||||
{
|
||||
px4_prctl(PR_SET_NAME, "log_writer_file", px4_getpid());
|
||||
|
||||
reinterpret_cast<LogWriterFile *>(context)->run();
|
||||
static_cast<LogWriterFile *>(context)->run();
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -407,7 +407,7 @@ void LogWriterFile::LogFileBuffer::write_no_check(void *ptr, size_t size)
|
||||
{
|
||||
size_t n = _buffer_size - _head; // bytes to end of the buffer
|
||||
|
||||
uint8_t *buffer_c = reinterpret_cast<uint8_t *>(ptr);
|
||||
uint8_t *buffer_c = static_cast<uint8_t *>(ptr);
|
||||
|
||||
if (size > n) {
|
||||
// Message goes over the end of the buffer
|
||||
|
||||
Reference in New Issue
Block a user