diff --git a/nmap_dns.cc b/nmap_dns.cc index e74fd85a2..0786ed482 100644 --- a/nmap_dns.cc +++ b/nmap_dns.cc @@ -947,7 +947,7 @@ static void parse_resolvdotconf() { } /* Customize a sscanf format to sizeof(ipaddr). */ - Snprintf(fmt, sizeof(fmt), "nameserver %%%us", sizeof(ipaddr)); + Snprintf(fmt, sizeof(fmt), "nameserver %%%us", (unsigned int) sizeof(ipaddr)); while (fgets(buf, sizeof(buf), fp)) { tp = buf; diff --git a/nmap_error.h b/nmap_error.h index 0e93771df..add612bd3 100644 --- a/nmap_error.h +++ b/nmap_error.h @@ -122,10 +122,12 @@ extern "C" { #endif void fatal(const char *fmt, ...) + __attribute__ ((noreturn)) __attribute__ ((format (printf, 1, 2))); void error(const char *fmt, ...) __attribute__ ((format (printf, 1, 2))); void pfatal(const char *err, ...) + __attribute__ ((noreturn)) __attribute__ ((format (printf, 1, 2))); void gh_perror(const char *err, ...) __attribute__ ((format (printf, 1, 2)));