mirror of
https://github.com/zeek/zeek.git
synced 2025-10-12 11:38:20 +00:00
Silence Clang's warning about ignoring GCC's maybe-uninitialized warning
Clang supports `#pragma GCC diagnostic` for "compatibility", but not `-Wmaybe-uninitialized`, so was emitting `warning: unknown warning group '-Wmaybe-uninitialized'`
This commit is contained in:
parent
b3c5e9adbb
commit
d9f4f9b371
1 changed files with 4 additions and 0 deletions
|
@ -2192,10 +2192,14 @@ void TableVal::SendToStore(const Val* index, const TableEntryVal* new_entry_val,
|
||||||
case ELEMENT_NEW:
|
case ELEMENT_NEW:
|
||||||
case ELEMENT_CHANGED:
|
case ELEMENT_CHANGED:
|
||||||
{
|
{
|
||||||
|
#ifndef __clang__
|
||||||
#pragma GCC diagnostic push
|
#pragma GCC diagnostic push
|
||||||
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
|
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
|
||||||
|
#endif
|
||||||
broker::optional<broker::timespan> expiry;
|
broker::optional<broker::timespan> expiry;
|
||||||
|
#ifndef __clang__
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
|
#endif
|
||||||
|
|
||||||
auto expire_time = GetExpireTime();
|
auto expire_time = GetExpireTime();
|
||||||
if ( expire_time == 0 )
|
if ( expire_time == 0 )
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue