From 015db425e31f4dd204f84b47fd78737f584381c3 Mon Sep 17 00:00:00 2001 From: Peter van Dijk Date: Thu, 30 May 2013 15:56:25 +0200 Subject: [PATCH] quiet silly -Wnarrowing warnings --- pdns/dnsparser.cc | 4 ++-- pdns/dnswriter.cc | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pdns/dnsparser.cc b/pdns/dnsparser.cc index 095454ac7..7eb5179e4 100644 --- a/pdns/dnsparser.cc +++ b/pdns/dnsparser.cc @@ -512,8 +512,8 @@ string simpleCompress(const string& elabel, const string& root) ret.reserve(label.size()+4); for(parts_t::const_iterator i=parts.begin(); i!=parts.end(); ++i) { if(!root.empty() && !strncasecmp(root.c_str(), label.c_str() + i->first, 1 + label.length() - i->first)) { // also match trailing 0, hence '1 +' - const char rootptr[2]={0xc0,0x11}; - ret.append(rootptr, 2); + const unsigned char rootptr[2]={0xc0,0x11}; + ret.append((const char *) rootptr, 2); return ret; } ret.append(1, (char)(i->second - i->first)); diff --git a/pdns/dnswriter.cc b/pdns/dnswriter.cc index d8b549c51..b39fa1ca4 100644 --- a/pdns/dnswriter.cc +++ b/pdns/dnswriter.cc @@ -68,8 +68,8 @@ void DNSPacketWriter::startRecord(const string& name, uint16_t qtype, uint32_t t d_rollbackmarker=d_content.size(); if(pdns_iequals(d_qname, d_recordqname)) { // don't do the whole label compression thing if we *know* we can get away with "see question" - static char marker[2]={0xc0, 0x0c}; - d_content.insert(d_content.end(), &marker[0], &marker[2]); + static unsigned char marker[2]={0xc0, 0x0c}; + d_content.insert(d_content.end(), (const char *) &marker[0], (const char *) &marker[2]); } else { xfrLabel(d_recordqname, true); -- 2.40.0