]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Merge pull request #112 in SNORT/snort3 from stream_warnings_patch to master
authorRuss Combs (rucombs) <rucombs@cisco.com>
Sun, 1 Nov 2015 16:56:19 +0000 (11:56 -0500)
committerRuss Combs (rucombs) <rucombs@cisco.com>
Sun, 1 Nov 2015 16:56:19 +0000 (11:56 -0500)
Squashed commit of the following:

commit 0881d5acce7594ed3fe56b36a2c6e6d7c360c513
Author: davis mcpherson <davis.mcpherson@gmail.com>
Date:   Fri Oct 30 14:51:32 2015 -0400

    only build unit test specific files when unit tests are enabled

commit ce554463c12976562abfb640288f4995269b8896
Author: davis mcpherson <davis.mcpherson@gmail.com>
Date:   Fri Oct 30 14:37:43 2015 -0400

    fix configure & compiler warnings

src/stream/Makefile.am
src/stream/libtcp/CMakeLists.txt
src/stream/libtcp/Makefile.am
src/stream/tcp/Makefile.am
src/stream/tcp/tcp_normalizers.cc

index 1627843567519bc87ce33b0953ec9da2bb38c63b..89cd8e461f6de133840ea995203d170dd3a49c61 100644 (file)
@@ -11,6 +11,7 @@ stream_splitter.h
 libstream_a_SOURCES = \
 flush_bucket.cc \
 flush_bucket.h \
+paf.cc \
 stream.h \
 stream_api.cc \
 stream_inspectors.cc \
index c992491cdcbff0029a40367f38821e30acee9ac3..82160d8599227fdacc2767597e70972dfc85073e 100644 (file)
@@ -1,8 +1,13 @@
 
+if ( BUILD_UNIT_TESTS )
+    set(TEST_FILES stream_tcp_unit_test.cc)
+endif()
+
+
 add_library( stream_libtcp STATIC
        tcp_segment_descriptor.cc
     tcp_stream_tracker.cc
        tcp_state_handler.cc
        tcp_state_machine.cc
-       stream_tcp_unit_test.cc
+    ${TEST_FILES}
 )
index 98f3d5f30f469961af45ed93dba07142359a6b46..9ac80388efbbd97a600a2925e6160fa084f4f006 100644 (file)
@@ -11,7 +11,12 @@ tcp_state_handler.h \
 tcp_state_machine.cc \
 tcp_state_machine.h \
 tcp_segment_descriptor.cc \
-tcp_segment_descriptor.h \
+tcp_segment_descriptor.h
+
+if BUILD_UNIT_TESTS
+libstream_libtcp_a_SOURCES += \
 stream_tcp_unit_test.cc \
 stream_tcp_unit_test.h
+endif
+
 
index 869bbcf7eb5b39163422cb7cc120edc9e8f9c7b7..3bfbd04807d7c127d39eb7976fac802c6c078d32 100644 (file)
@@ -2,7 +2,6 @@
 noinst_LIBRARIES = libstream_tcp.a
 
 libstream_tcp_a_SOURCES = \
-../paf.cc \
 stream_tcp.cc \
 stream_tcp.h \
 segment_overlap_editor.h \
index 2f5fc1e7afc3707d181a700d76ba12ee3c89e414..ab315abe2730af56059e76dc6a81d4de8c1a61c5 100644 (file)
@@ -496,6 +496,10 @@ int TcpNormalizerVista::handle_repeated_syn( TcpDataBlock *tdb )
 
 bool TcpNormalizerProxy::validate_rst( TcpDataBlock *tdb )
 {
+#ifndef DEBUG_MSGS
+    UNUSED( tdb );
+#endif
+
     // FIXIT - will session->flow ever be null? i would think not, remove this check if possible
     if( session->flow )
     {