Trace::Logger: workaround for compiling with GCC 6

Issue #2375
This commit is contained in:
Christian Prochaska 2017-04-10 17:50:08 +02:00 committed by Christian Helmuth
parent 661a3100b1
commit 78a9cbf82d
2 changed files with 2 additions and 0 deletions

View File

@ -66,6 +66,7 @@ struct Genode::Trace::Logger
* Log event to trace buffer
*/
template <typename EVENT>
__attribute__((optimize("-fno-delete-null-pointer-checks")))
void log(EVENT const *event)
{
if (!this || !_evaluate_control()) return;

View File

@ -122,6 +122,7 @@ bool Trace::Logger::_evaluate_control()
}
__attribute__((optimize("-fno-delete-null-pointer-checks")))
void Trace::Logger::log(char const *msg, size_t len)
{
if (!this || !_evaluate_control()) return;