]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Merge pull request #290 in SNORT/snort3 from ~JOCORNET/snort3:warnings_fix to master
authorRuss Combs (rucombs) <rucombs@cisco.com>
Wed, 24 Feb 2016 11:53:34 +0000 (06:53 -0500)
committerRuss Combs (rucombs) <rucombs@cisco.com>
Wed, 24 Feb 2016 11:53:34 +0000 (06:53 -0500)
Squashed commit of the following:

commit 500d61d4e061d2858f6b79cb356bc7ede254e37a
Author: Joel Cornett <joel.cornett@gmail.com>
Date:   Wed Feb 24 00:14:29 2016 -0500

    fix warnings in trough

src/packet_io/trough.cc

index 4f973a0273ae3b34771fec58d98a0122fba8c31a..b4604e141a95b560397599a7d5d48ea0a8ff37c2 100644 (file)
@@ -49,8 +49,6 @@ unsigned Trough::file_count = 0;
  ****************************************************************/
 int Trough::get_pcaps(std::vector<struct PcapReadObject> &pol, std::vector<std::string> &pcap_queue)
 {
-    int ret = 0;
-
     for (const PcapReadObject &pro : pol)
     {
         const std::string& arg = pro.arg;
@@ -134,7 +132,8 @@ int Trough::get_pcaps(std::vector<struct PcapReadObject> &pol, std::vector<std::
                 {
                     struct stat sb;
                     std::string pcap_name;
-                    auto i = 0, pos = 0;
+                    auto i = 0;
+                    size_t pos = 0;
 
                     if (arg.empty())
                     {