diff options
author | 2015-12-15 15:39:58 +0200 | |
---|---|---|
committer | 2015-12-15 15:39:58 +0200 | |
commit | fb74954c33722dc25236137f76c8fa7a3aeafa2e (patch) | |
tree | 60ea1d8daac9bab312e7bf01179aee192a1eb08f | |
parent | e7ffce7b0317f9861264b17d003b22915177de33 (diff) |
fix ubuntu compiler warnings
-rw-r--r-- | src/gtest/trex_stateless_gtest.cpp | 4 | ||||
-rw-r--r-- | src/stateless/cp/trex_stream_vm.cpp | 8 | ||||
-rw-r--r-- | src/stateless/cp/trex_stream_vm.h | 3 |
3 files changed, 11 insertions, 4 deletions
diff --git a/src/gtest/trex_stateless_gtest.cpp b/src/gtest/trex_stateless_gtest.cpp index d758ea7e..88c68095 100644 --- a/src/gtest/trex_stateless_gtest.cpp +++ b/src/gtest/trex_stateless_gtest.cpp @@ -805,7 +805,7 @@ static void vm_build_program_seq(StreamVm & vm, ); - vm.set_packet_size(128); + vm.set_packet_size(packet_size); vm.compile_next(); } @@ -2050,8 +2050,6 @@ TEST_F(basic_stl, vm_enable0) { streams.push_back(stream1); // stream - clean - - std::vector<TrexStreamsCompiledObj *> objs; assert(compile.compile(port_id,streams, objs) ); diff --git a/src/stateless/cp/trex_stream_vm.cpp b/src/stateless/cp/trex_stream_vm.cpp index 188be2d8..310a4369 100644 --- a/src/stateless/cp/trex_stream_vm.cpp +++ b/src/stateless/cp/trex_stream_vm.cpp @@ -337,7 +337,7 @@ void StreamVm::build_program(){ if (lpMan->m_size_bytes == 1 ){ - uint8_t op; + uint8_t op=StreamDPVmInstructions::ditINC8; if ( lpMan->m_op == StreamVmInstructionFlowMan::FLOW_VAR_OP_INC ){ op = StreamDPVmInstructions::ditINC8 ; @@ -362,6 +362,8 @@ void StreamVm::build_program(){ if (lpMan->m_size_bytes == 2 ){ uint8_t op; + op = StreamDPVmInstructions::ditINC16; + if ( lpMan->m_op == StreamVmInstructionFlowMan::FLOW_VAR_OP_INC ){ op = StreamDPVmInstructions::ditINC16 ; } @@ -385,6 +387,8 @@ void StreamVm::build_program(){ if (lpMan->m_size_bytes == 4 ){ uint8_t op; + op = StreamDPVmInstructions::ditINC32; + if ( lpMan->m_op == StreamVmInstructionFlowMan::FLOW_VAR_OP_INC ){ op = StreamDPVmInstructions::ditINC32 ; } @@ -408,6 +412,8 @@ void StreamVm::build_program(){ if (lpMan->m_size_bytes == 8 ){ uint8_t op; + op = StreamDPVmInstructions::ditINC64; + if ( lpMan->m_op == StreamVmInstructionFlowMan::FLOW_VAR_OP_INC ){ op = StreamDPVmInstructions::ditINC64 ; } diff --git a/src/stateless/cp/trex_stream_vm.h b/src/stateless/cp/trex_stream_vm.h index 2bf72829..0484693f 100644 --- a/src/stateless/cp/trex_stream_vm.h +++ b/src/stateless/cp/trex_stream_vm.h @@ -27,6 +27,9 @@ limitations under the License. #include <unordered_map> #include <assert.h> #include <common/Network/Packet/IPHeader.h> +#include "pal_utl.h" +#include "mbuf.h" + |