Fix lots of compiler warnings
This commit is contained in:
parent
47d1c2a74d
commit
478d91ac53
9 changed files with 12 additions and 15 deletions
|
@ -506,7 +506,6 @@ start_name_collision_check(clock_time_t after)
|
|||
static unsigned char *
|
||||
mdns_write_announce_records(unsigned char *queryptr, uint8_t *count)
|
||||
{
|
||||
struct dns_answer *ans;
|
||||
|
||||
#if UIP_CONF_IPV6
|
||||
uint8_t i;
|
||||
|
@ -524,7 +523,6 @@ mdns_write_announce_records(unsigned char *queryptr, uint8_t *count)
|
|||
*queryptr++ = 0xc0;
|
||||
*queryptr++ = sizeof(struct dns_hdr);
|
||||
}
|
||||
ans = (struct dns_answer *)queryptr;
|
||||
|
||||
*queryptr++ = (uint8_t) ((NATIVE_DNS_TYPE) >> 8);
|
||||
*queryptr++ = (uint8_t) ((NATIVE_DNS_TYPE));
|
||||
|
@ -546,6 +544,7 @@ mdns_write_announce_records(unsigned char *queryptr, uint8_t *count)
|
|||
}
|
||||
}
|
||||
#else /* UIP_CONF_IPV6 */
|
||||
struct dns_answer *ans;
|
||||
queryptr = encode_name(queryptr, resolv_hostname);
|
||||
ans = (struct dns_answer *)queryptr;
|
||||
ans->type = UIP_HTONS(NATIVE_DNS_TYPE);
|
||||
|
@ -603,8 +602,6 @@ mdns_prep_host_announce_packet(void)
|
|||
|
||||
uint8_t total_answers = 0;
|
||||
|
||||
struct dns_answer *ans;
|
||||
|
||||
/* Be aware that, unless `ARCH_DOESNT_NEED_ALIGNED_STRUCTS` is set,
|
||||
* writing directly to the uint16_t members of this struct is an error. */
|
||||
struct dns_hdr *hdr = (struct dns_hdr *)uip_appdata;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue