]> git.meshlink.io Git - catta/blobdiff - src/entry.c
Fix some compiler warnings found by GCC 9 and Clang 10.
[catta] / src / entry.c
index cd3c6e2f7230218ba0b58edefb83868a1fed55fa..82c1553745c0339eab97b7bddf6441f8247ea2de 100644 (file)
@@ -30,7 +30,6 @@
 
 #include <arpa/inet.h>
 
-#include <sys/utsname.h>
 #include <sys/types.h>
 #include <sys/socket.h>
 
@@ -716,7 +715,7 @@ int catta_server_add_service(
     const char *type,
     const char *domain,
     const char *host,
-    uint16_t port,
+    unsigned int port,
     ... ){
 
     va_list va;
@@ -902,7 +901,7 @@ static CattaEntry *server_add_dns_server_name(
     uint16_t port /** should be 53 */) {
 
     CattaEntry *e;
-    char t[CATTA_DOMAIN_NAME_MAX], normalized_d[CATTA_DOMAIN_NAME_MAX], *n;
+    char t[CATTA_DOMAIN_NAME_MAX + 20], normalized_d[CATTA_DOMAIN_NAME_MAX], *n;
 
     CattaRecord *r;
 
@@ -958,7 +957,7 @@ int catta_server_add_dns_server_address(
     uint16_t port /** should be 53 */) {
 
     CattaRecord *r;
-    char n[64], h[64];
+    char n[64 + 20], h[64];
     CattaEntry *a_entry, *s_entry;
 
     assert(s);