mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
addressed minor issues flagged by Coverity
This commit is contained in:
parent
bbcb90741d
commit
cf456f943f
3 changed files with 6 additions and 6 deletions
|
@ -229,7 +229,7 @@ ExprPtr Expr::ReduceToConditional(Reducer* c, StmtPtr& red_stmt) {
|
|||
// conditional.
|
||||
StmtPtr red_stmt2;
|
||||
new_me = new_me->ReduceToConditional(c, red_stmt2);
|
||||
red_stmt = MergeStmts(red_stmt, red_stmt2);
|
||||
red_stmt = MergeStmts(std::move(red_stmt), std::move(red_stmt2));
|
||||
|
||||
return new_me;
|
||||
}
|
||||
|
@ -252,7 +252,7 @@ ExprPtr Expr::ReduceToConditional(Reducer* c, StmtPtr& red_stmt) {
|
|||
|
||||
StmtPtr red_stmt2;
|
||||
auto res = Reduce(c, red_stmt2);
|
||||
red_stmt = MergeStmts(red_stmt, red_stmt2);
|
||||
red_stmt = MergeStmts(std::move(red_stmt), std::move(red_stmt2));
|
||||
return res;
|
||||
}
|
||||
|
||||
|
@ -2950,7 +2950,7 @@ bool ScriptOptBuiltinExpr::IsPure() const { return arg1->IsPure() && (! arg2 ||
|
|||
|
||||
ExprPtr ScriptOptBuiltinExpr::Duplicate() {
|
||||
auto new_me = make_intrusive<ScriptOptBuiltinExpr>(tag, arg1, arg2);
|
||||
return with_location_of(new_me, this);
|
||||
return with_location_of(std::move(new_me), this);
|
||||
}
|
||||
|
||||
bool ScriptOptBuiltinExpr::IsReduced(Reducer* c) const {
|
||||
|
@ -2980,7 +2980,7 @@ ExprPtr ScriptOptBuiltinExpr::Reduce(Reducer* c, StmtPtr& red_stmt) {
|
|||
if ( arg2 ) {
|
||||
StmtPtr red_stmt2;
|
||||
arg2 = arg2->Reduce(c, red_stmt2);
|
||||
red_stmt = MergeStmts(red_stmt, red_stmt2);
|
||||
red_stmt = MergeStmts(std::move(red_stmt), std::move(red_stmt2));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -290,7 +290,7 @@ MultiZBI::MultiZBI(std::string name, bool _ret_val_matters, BiFArgsInfo _args_in
|
|||
: ZAMBuiltIn(std::move(name), _ret_val_matters), args_info(std::move(_args_info)), type_arg(_type_arg) {}
|
||||
|
||||
MultiZBI::MultiZBI(std::string name, BiFArgsInfo _args_info, BiFArgsInfo _assign_args_info, int _type_arg)
|
||||
: MultiZBI(std::move(name), false, _args_info, _type_arg) {
|
||||
: MultiZBI(std::move(name), false, std::move(_args_info), _type_arg) {
|
||||
assign_args_info = std::move(_assign_args_info);
|
||||
have_both = true;
|
||||
}
|
||||
|
|
|
@ -1233,7 +1233,7 @@ direct-unary-op Record-Constructor ConstructRecord
|
|||
macro ConstructRecordPost()
|
||||
auto& r = frame[z.v1].record_val;
|
||||
Unref(r);
|
||||
r = new RecordVal(cast_intrusive<RecordType>(z.t), init_vals);
|
||||
r = new RecordVal(cast_intrusive<RecordType>(z.t), std::move(init_vals));
|
||||
|
||||
op Construct-Direct-Record
|
||||
type V
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue