log: fix gcc warnings

This commit is contained in:
Andrei Alexeyev 2023-05-26 01:41:52 +02:00
parent b233afaaa6
commit ad08ddcd7b
No known key found for this signature in database
GPG key ID: 72D26128040B9690

View file

@ -240,7 +240,14 @@ static void log_dispatch(LogEntry *entry) {
if(l->levels & entry->level) {
if(!init) {
modname(entry->file, strlen(entry->file), mbuf);
DIAGNOSTIC_GCC(push)
DIAGNOSTIC_GCC(ignored "-Wpragmas")
DIAGNOSTIC_GCC(ignored "-Wdangling-pointer")
// The formatter is not expected to leak this out of the the stack frame.
entry->module = mbuf;
DIAGNOSTIC_GCC(pop)
filter_lvlmask = filter_entry(entry);
init = true;
}