mirror of
https://github.com/zeek/zeek.git
synced 2025-10-08 17:48:21 +00:00
address clang 10 warnings
This commit is contained in:
parent
e0b4659488
commit
a830c269ab
2 changed files with 9 additions and 1 deletions
|
@ -1099,7 +1099,7 @@ eval auto v = frame[z.v2].double_val;
|
||||||
ZAM_run_time_error(z.loc, "underflow converting double to count");
|
ZAM_run_time_error(z.loc, "underflow converting double to count");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if ( v > UINT64_MAX )
|
if ( v > static_cast<double>(UINT64_MAX) )
|
||||||
{
|
{
|
||||||
ZAM_run_time_error(z.loc, "overflow converting double to count");
|
ZAM_run_time_error(z.loc, "overflow converting double to count");
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -379,6 +379,13 @@ const ZAMStmt ZAMCompiler::GenCond(const Expr* e, int& branch_v)
|
||||||
else
|
else
|
||||||
branch_v = 2;
|
branch_v = 2;
|
||||||
|
|
||||||
|
// clang 10 gets perturbed that the indentation of the "default" in the
|
||||||
|
// following switch block doesn't match that of the cases that we include
|
||||||
|
// from "ZAM-Conds.h". It really shouldn't worry about indentation mismatches
|
||||||
|
// across included files since those are not indicative of possible
|
||||||
|
// logic errors, but Oh Well.
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wmisleading-indentation"
|
||||||
switch ( e->Tag() )
|
switch ( e->Tag() )
|
||||||
{
|
{
|
||||||
#include "ZAM-Conds.h"
|
#include "ZAM-Conds.h"
|
||||||
|
@ -386,6 +393,7 @@ const ZAMStmt ZAMCompiler::GenCond(const Expr* e, int& branch_v)
|
||||||
default:
|
default:
|
||||||
reporter->InternalError("bad expression type in ZAMCompiler::GenCond");
|
reporter->InternalError("bad expression type in ZAMCompiler::GenCond");
|
||||||
}
|
}
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
|
||||||
// Not reached.
|
// Not reached.
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue