]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Pull request #3199: Compilation fix with GCC5
authorMike Stepanek (mstepane) <mstepane@cisco.com>
Fri, 3 Dec 2021 14:06:32 +0000 (14:06 +0000)
committerMike Stepanek (mstepane) <mstepane@cisco.com>
Fri, 3 Dec 2021 14:06:32 +0000 (14:06 +0000)
Merge in SNORT/snort3 from ~OSERHIIE/snort3:gcc5_compile_fix to master

Squashed commit of the following:

commit d1b153c75fe8ca2de7d86f8078c482b23af5fa00
Author: Oleksandr Serhiienko <oserhiie@cisco.com>
Date:   Fri Dec 3 02:46:58 2021 -0500

    utils: (JSTokenizer) fix braces initialization compilation error (gcc5)

src/utils/js_tokenizer.l

index 4159e661717f9a54df40dc786d18fc66931b6b17..762583ea8bdcedce5f17045f4dc78466a72d0aaf 100644 (file)
@@ -1488,7 +1488,7 @@ void JSTokenizer::states_reset()
     if (tmp_buffer)
         switch_to_initial();
 
-    brace_depth = {};
+    brace_depth = std::stack<uint16_t, std::vector<uint16_t>>();
     token = UNDEFINED;
     previous_group = ASI_OTHER;
 
@@ -1501,7 +1501,7 @@ void JSTokenizer::states_reset()
 
     newline_found = false;
 
-    scope_stack = {};
+    scope_stack = std::stack<Scope>();
     scope_stack.emplace(GLOBAL);
     BEGIN(regst);
 }