clang-tidy: partially fix cppcoreguidelines-pro-type-reinterpret-cast

This commit is contained in:
Daniel Agar
2019-10-28 10:50:31 -04:00
parent f5945d1185
commit 4192414576
16 changed files with 26 additions and 26 deletions
+2 -2
View File
@@ -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