]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Merge pull request #876 in SNORT/snort3 from warnings to master
authorRuss Combs (rucombs) <rucombs@cisco.com>
Mon, 1 May 2017 16:41:39 +0000 (12:41 -0400)
committerRuss Combs (rucombs) <rucombs@cisco.com>
Mon, 1 May 2017 16:41:39 +0000 (12:41 -0400)
Squashed commit of the following:

commit 26670f34b12aba46c2416950ad3ec26f04f0f33c
Author: Michael Altizer <mialtize@cisco.com>
Date:   Mon May 1 11:39:57 2017 -0400

    main: Fix compiler warnings when SHELL is not enabled

src/main.cc

index 3fee35c28aca147fa694df0814df101d3bc28411..e7830c03fecc79dd86c60bd56898e0a08c135c88 100644 (file)
@@ -110,7 +110,9 @@ static int main_read()
 
 static Request request;
 static Request* current_request = &request;
+#ifdef SHELL
 static int current_fd = -1;
+#endif
 
 //-------------------------------------------------------------------------
 // pig foo
@@ -270,7 +272,9 @@ static void broadcast(AnalyzerCommand* ac)
 
 static AnalyzerCommand* get_command(AnalyzerCommand* ac, bool from_shell)
 {
-#ifdef SHELL
+#ifndef SHELL
+    UNUSED(from_shell);
+#else
     if ( from_shell )
         return ( new ACShellCmd(current_fd, ac) );
     else