]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
silence compiler warnings, plus minor zone2json cleanup, thanks Aki Tuomi. Closes...
authorPeter van Dijk <peter.van.dijk@netherlabs.nl>
Wed, 2 Jan 2013 08:43:11 +0000 (08:43 +0000)
committerPeter van Dijk <peter.van.dijk@netherlabs.nl>
Wed, 2 Jan 2013 08:43:11 +0000 (08:43 +0000)
git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@3012 d19b8d6e-7fed-0310-83ef-9ca221ded41b

modules/remotebackend/pipeconnector.cc
pdns/backends/bind/Makefile.am
pdns/backends/bind/bindlexer.l
pdns/backends/bind/zone2json.cc
pdns/dnssecsigner.cc
pdns/tcpreceiver.cc

index 2f256552d69de1c0489bbeb0646b8819d1aceeef..9e28980aad96e618f82635214f0abd906a05fc12 100644 (file)
@@ -65,7 +65,6 @@ int PipeConnector::recv_message(rapidjson::Document &output)
    rapidjson::GenericReader<rapidjson::UTF8<> , rapidjson::MemoryPoolAllocator<> > r;
    std::string tmp;
    std::string s_output;
-   int nread=0;
 
    launch();
    try {
index 951bf9b09ebd9cf7418db5e61b46d58494ff3517..b4c6e7c51ff378092f002a48af38e7485f8bca6d 100644 (file)
@@ -5,7 +5,7 @@ AM_CPPFLAGS=$(BOOST_CPPFLAGS) @THREADFLAGS@
 BUILT_SOURCES=bind-dnssec.schema.sqlite3.sql.h
 
 bind-dnssec.schema.sqlite3.sql.h: ../../bind-dnssec.schema.sqlite3.sql
-       ( echo 'static char sqlCreate[]=' ; sed 's/$$/"/g' ../../bind-dnssec.schema.sqlite3.sql | sed 's/^/"/g'  ; echo ';' ) > $@
+       ( echo 'static char sqlCreate[] __attribute__((unused))=' ; sed 's/$$/"/g' ../../bind-dnssec.schema.sqlite3.sql | sed 's/^/"/g'  ; echo ';' ) > $@
 
 
 libbind2backend_la_SOURCES=bindbackend2.cc bindbackend2.hh bindparser.yy \
index 648acb3d9f96c92c7035fd2d8636779ceb166a73..1ecb394ee1bd4123518307c9fc889b0147f83322 100644 (file)
@@ -4,6 +4,7 @@
 #include <string.h>
 #include <errno.h>
 
+#define YY_NO_INPUT 1
 #define YYSTYPE char *
 
 #ifdef WIN32
@@ -39,6 +40,10 @@ extern const char *bind_directory;
 %x incl
 %x quoted
 %option stack
+%option nounput
+%option noyy_top_state
+%option noinput
+
 %%
 
 
index fa6ca71ff30ae1591c64d66185f6a48272a4e25f..e80d6d7452b0106e7ad770749b97d9b9a3d054fa 100644 (file)
@@ -42,7 +42,6 @@
 
 
 StatBag S;
-static bool g_intransaction;
 static int g_numRecords;
 
 static void quoteValue(string &value) 
@@ -80,11 +79,6 @@ static string emitRecord(const string& zoneName, const string &qname, const stri
     trim_left(content);
   }
 
-  bool auth = true;
-  if(qtype == "NS" && !pdns_iequals(stripDot(qname), zoneName)) {
-    auth=false;
-  }
   quoteValue(content);
  
   retval = "{";
index b6fa71fa59ffcaed693a20d9d393555396863b75..7c276c882746ce4dcba7652f429d52131bf27653 100644 (file)
@@ -143,7 +143,7 @@ void fillOutRRSIG(DNSSECPrivateKey& dpk, const std::string& signQName, RRSIGReco
   if(doCache) {
     WriteLock l(&g_signatures_lock);
     /* we add some jitter here so not all your slaves start pruning their caches at the very same millisecond */
-    unsigned int weekno = (time(0) - dns_random(3600)) / (86400*7);  // we just spent milliseconds doing a signature, microsecond more won't kill us
+    int weekno = (time(0) - dns_random(3600)) / (86400*7);  // we just spent milliseconds doing a signature, microsecond more won't kill us
   
     if(g_cacheweekno < weekno) {  // blunt but effective (C) Habbie
       g_signatures.clear();
index ae118c83326391a267a45b4ef0ca4688e829f01d..9e4a207b45c781cd21a73dc167f936a9a972f46b 100644 (file)
@@ -937,7 +937,7 @@ void TCPNameserver::thread()
             if(room<1)
               L<<Logger::Warning<<Logger::NTLog<<"Limit of simultaneous TCP connections reached - raise max-tcp-connections"<<endl;
 
-            if(pthread_create(&tid, 0, &doConnection, (void *)fd)) {
+            if(pthread_create(&tid, 0, &doConnection, reinterpret_cast<void*>(fd))) {
               L<<Logger::Error<<"Error creating thread: "<<stringerror()<<endl;
               d_connectionroom_sem->post();
             }