Forced suppression of some compiler warnings in miosix kernel sources

This commit is contained in:
Silvano Seva 2022-10-19 14:35:11 +02:00
parent 37c9e0dbc3
commit a0c721b30d
3 changed files with 11 additions and 0 deletions

View File

@ -325,6 +325,8 @@ Thread *Thread::create(void *(*startfunc)(void *), unsigned int stacksize,
return thread;
}
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wcast-function-type"
Thread *Thread::create(void (*startfunc)(void *), unsigned int stacksize,
Priority priority, void *argv, unsigned short options)
{
@ -332,6 +334,7 @@ Thread *Thread::create(void (*startfunc)(void *), unsigned int stacksize,
return Thread::create(reinterpret_cast<void *(*)(void*)>(startfunc),
stacksize,priority,argv,options);
}
#pragma GCC diagnostic pop
void Thread::yield()
{

View File

@ -28,11 +28,14 @@
#ifndef LOGGING_H
#define LOGGING_H
#pragma GCC system_header
#include "config/miosix_settings.h"
#include "filesystem/console/console_device.h"
#include <cstdio>
#include <cstdarg>
/**
* Print boot logs. Contrary to (i)printf(), this can be disabled in
* miosix_settings.h if boot logs are not wanted. Can only be called when the

View File

@ -69,6 +69,9 @@ static void callConstructors(unsigned long *start, unsigned long *end)
}
}
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wpedantic"
void *mainLoader(void *argv)
{
(void) argv;
@ -113,6 +116,8 @@ void *mainLoader(void *argv)
return 0;
}
#pragma GCC diagnostic pop
} //namespace miosix
extern "C" void _init()