~samiam/MaraDNS

ref: 3.5.0021 MaraDNS/deadwood-github/update/3.2.06/deadwood-3.2.05-GCC482.patch -rw-r--r-- 1.5 KiB
ca00f282 — Sam Trenholme MaraDNS release 3.5.0021 9 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
Removed two warnings generated by GCC 4.8.2

diff --git a/deadwood-github/src/DwRecurse.c b/deadwood-github/src/DwRecurse.c
index 12f646f..4a5f831 100644
--- a/deadwood-github/src/DwRecurse.c
+++ b/deadwood-github/src/DwRecurse.c
@@ -1906,10 +1906,9 @@ void dwx_add_final_answer(dw_str *query, dw_str *answer, dw_str *value,
  * to a SOA "not there" reply. */
 dw_str *dwx_alt_cname_reply(dw_str *query, dw_str *action, dw_str *answer,
                 int32_t ttl) {
-        int len = 0, place = 0, type = 0;
+        int len = 0, place = 0;
         dw_str *value = 0;
 
-        type = dw_fetch_u8(answer,-1);
         /* We will just give the stub resolver our first CNAME link */
         value = dwx_make_one_cname_rr(query, 0, action, 2, ttl, &len, 260);
         place = dw_get_dn_end(value, 0);
diff --git a/deadwood-github/src/DwUdpSocket.c b/deadwood-github/src/DwUdpSocket.c
index 93ff315..0845d5b 100644
--- a/deadwood-github/src/DwUdpSocket.c
+++ b/deadwood-github/src/DwUdpSocket.c
@@ -795,11 +795,10 @@ int cache_dns_reply(unsigned char *packet, int count, int b, int truncated) {
         int is_nxdomain = 0;
         dw_str *question = 0, *answer = 0;
         dw_str *decomp = 0;
-        int ret = -1, qtype = -1;
+        int ret = -1;
 
         question = dw_get_dname_type(packet,12,count);
         dwc_lower_case(question);
-        qtype = dw_fetch_u16(question,-1);
         dw_log_dwstr("Caching a reply for query ",question,1000);
         if((packet[3] & 0x0f) == 2) { /* Server FAIL */
                 ret = -1; /* Bad return value; do not cache */