diff --git a/src/DNS_Mgr.h b/src/DNS_Mgr.h index 1551088b40..5f31501b21 100644 --- a/src/DNS_Mgr.h +++ b/src/DNS_Mgr.h @@ -159,6 +159,7 @@ protected: char* dir; // directory in which cache_name resides bool did_init; + int asyncs_pending; RecordTypePtr dm_rec; @@ -236,8 +237,6 @@ protected: typedef std::priority_queue, AsyncRequestCompare> TimeoutQueue; TimeoutQueue asyncs_timeouts; - int asyncs_pending; - unsigned long num_requests; unsigned long successful; unsigned long failed; diff --git a/src/Desc.h b/src/Desc.h index 23fb172ec6..e48ab5a066 100644 --- a/src/Desc.h +++ b/src/Desc.h @@ -200,18 +200,17 @@ protected: bool is_short; bool want_quotes; bool want_determinism; + bool do_flush; + bool include_stats; int indent_with_spaces; + int indent_level; using escape_set = std::set; escape_set escape_sequences; // additional sequences of chars to escape File* f; // or the file we're using. - int indent_level; - bool do_flush; - bool include_stats; - std::set encountered_types; }; diff --git a/src/Dict.cc b/src/Dict.cc index 4f0e0f78d6..a31fdd39be 100644 --- a/src/Dict.cc +++ b/src/Dict.cc @@ -28,8 +28,8 @@ class [[deprecated("Remove in v5.1. Use the standard-library-compatible version public: IterCookie(Dictionary* d) : d(d) {} - bool robust = false; Dictionary* d = nullptr; + bool robust = false; // Index for the next valid entry. -1 is the default, meaning we haven't started // iterating yet. diff --git a/src/Expr.cc b/src/Expr.cc index a82be72c58..31679edf49 100644 --- a/src/Expr.cc +++ b/src/Expr.cc @@ -76,7 +76,7 @@ const char* expr_name(BroExprTag t) return expr_names[int(t)]; } -Expr::Expr(BroExprTag arg_tag) : tag(arg_tag), type(nullptr), paren(false) +Expr::Expr(BroExprTag arg_tag) : tag(arg_tag), paren(false), type(nullptr) { SetLocationInfo(&start_location, &end_location); } diff --git a/src/Expr.h b/src/Expr.h index f0ff7f7763..afeb1425ff 100644 --- a/src/Expr.h +++ b/src/Expr.h @@ -411,8 +411,8 @@ protected: [[noreturn]] void RuntimeErrorWithCallStack(const std::string& msg) const; BroExprTag tag; - TypePtr type; bool paren; + TypePtr type; // The original expression from which this statement was // derived, if any. Used as an aid for generating meaningful @@ -907,10 +907,10 @@ protected: bool TypeCheckArithmetics(TypeTag bt1, TypeTag bt2); bool is_init; + bool is_temp = false; // Optimization related + ValPtr val; // optional - // Optimization-related: - bool is_temp = false; }; class IndexSliceAssignExpr final : public AssignExpr { diff --git a/src/NFA.h b/src/NFA.h index 23d85ce23f..e175ece3be 100644 --- a/src/NFA.h +++ b/src/NFA.h @@ -67,6 +67,7 @@ public: protected: int sym; // if SYM_CCL, then use ccl + int id; // number that uniquely identifies this state CCL* ccl; // if nil, then use sym int accept; @@ -74,8 +75,6 @@ protected: // to avoid reference-counting loops. bool first_trans_is_back_ref; - int id; // number that uniquely identifies this state - NFA_state_list xtions; NFA_state_list* epsclosure; NFA_State* mark; diff --git a/src/Obj.h b/src/Obj.h index 503abbd3ac..5c5abdd0a8 100644 --- a/src/Obj.h +++ b/src/Obj.h @@ -153,8 +153,8 @@ private: friend inline void Ref(Obj* o); friend inline void Unref(Obj* o); - bool notify_plugins = false; int ref_cnt = 1; + bool notify_plugins = false; // If non-zero, do not print runtime errors. Useful for // speculative evaluation. diff --git a/src/Type.cc b/src/Type.cc index e3fd526c0a..d63f5c3573 100644 --- a/src/Type.cc +++ b/src/Type.cc @@ -915,12 +915,13 @@ public: R_INIT_VECTOR, // field requires a new vector } init_type; + bool def_coerce = false; // whether coercion's required + // For R_INIT_DIRECT/R_INIT_DIRECT_MANAGED: ZVal direct_init; detail::ExprPtr def_expr; TypePtr def_type; - bool def_coerce = false; // whether coercion's required RecordTypePtr r_type; // for R_INIT_RECORD TableTypePtr t_type; // for R_INIT_TABLE diff --git a/src/script_opt/ScriptOpt.h b/src/script_opt/ScriptOpt.h index ca42f1fdea..4e4d506b5b 100644 --- a/src/script_opt/ScriptOpt.h +++ b/src/script_opt/ScriptOpt.h @@ -121,12 +121,12 @@ protected: std::shared_ptr pf; int priority; + // Whether to skip optimizing this function. + bool skip = false; + // If we're saving this function in a file, this is the name // of the file to use. std::string save_file; - - // Whether to skip optimizing this function. - bool skip = false; }; diff --git a/src/supervisor/Supervisor.h b/src/supervisor/Supervisor.h index 0fb02d35b9..74218e74cd 100644 --- a/src/supervisor/Supervisor.h +++ b/src/supervisor/Supervisor.h @@ -118,14 +118,14 @@ public: * The node's role within the cluster. E.g. manager, logger, worker. */ BifEnum::Supervisor::ClusterRole role; - /** - * The host/IP at which the cluster node is listening for connections. - */ - std::string host; /** * The TCP port number at which the cluster node listens for connections. */ int port; + /** + * The host/IP at which the cluster node is listening for connections. + */ + std::string host; /** * The interface name from which the node read/analyze packets. * Typically used by worker nodes. @@ -324,10 +324,10 @@ private: Config config; pid_t stem_pid; + int last_signal = -1; std::unique_ptr stem_pipe; detail::LineBufferedPipe stem_stdout; detail::LineBufferedPipe stem_stderr; - int last_signal = -1; detail::Flare signal_flare; NodeMap nodes; std::string msg_buffer; diff --git a/src/threading/BasicThread.h b/src/threading/BasicThread.h index ba26190ffb..8345bda965 100644 --- a/src/threading/BasicThread.h +++ b/src/threading/BasicThread.h @@ -204,8 +204,8 @@ private: bool killed; // Set to true once forcefully killed. // For implementing Fmt(). + uint32_t buf_len; char* buf; - unsigned int buf_len; // For implementating Strerror(). char* strerr_buffer;