]> granicus.if.org Git - pdns/commitdiff
silence warnings, enable separate compilation
authorBert Hubert <bert.hubert@netherlabs.nl>
Sun, 15 Aug 2010 08:41:23 +0000 (08:41 +0000)
committerBert Hubert <bert.hubert@netherlabs.nl>
Sun, 15 Aug 2010 08:41:23 +0000 (08:41 +0000)
git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@1689 d19b8d6e-7fed-0310-83ef-9ca221ded41b

pdns/speedtest.cc

index 3d415b80dcff5af4d0b10be89a4f26eae1ed48b9..20294569d642d495d1bd9186cc4dd7fe74fafef1 100644 (file)
@@ -4,11 +4,13 @@
 #include "dnswriter.hh"
 #include "dnsrecords.hh"
 #include <boost/format.hpp>
+#include "config.h"
 #ifndef RECURSOR
 #include "statbag.hh"
 StatBag S;
 #endif
 
+volatile bool g_ret; // make sure the optimizer does not get too smart
 uint64_t g_totalRuns;
 
 volatile bool g_stop;
@@ -674,7 +676,7 @@ struct IEqualsTest
   void operator()() const
   {
       static string a("www.ds9a.nl"), b("www.lwn.net");
-      bool ret = boost::iequals(a, b);
+      g_ret = boost::iequals(a, b);
   }
 
 };
@@ -689,7 +691,7 @@ struct MyIEqualsTest
   void operator()() const
   {
       static string a("www.ds9a.nl"), b("www.lwn.net");
-      bool ret = pdns_iequals(a, b);
+      g_ret = pdns_iequals(a, b);
   }
 
 };
@@ -705,7 +707,7 @@ struct StrcasecmpTest
   void operator()() const
   {
       static string a("www.ds9a.nl"), b("www.lwn.net");
-      bool ret = strcasecmp(a.c_str(), b.c_str());
+      g_ret = strcasecmp(a.c_str(), b.c_str());
   }
 };