]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
please lint.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Tue, 6 Jan 2015 14:18:03 +0000 (14:18 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Tue, 6 Jan 2015 14:18:03 +0000 (14:18 +0000)
git-svn-id: file:///svn/unbound/trunk@3305 be551aaa-1e26-0410-a405-d3ace91eadb9

daemon/remote.c
services/listen_dnsport.c
smallapp/unbound-control.c

index a1d2628a904a2d9d5aed0f687e644cef216b9908..e0cfa0dc4d7e366c1f1ba2a0df48c560c16eefdd 100644 (file)
@@ -142,6 +142,7 @@ timeval_divide(struct timeval* avg, const struct timeval* sum, size_t d)
  * The following function was generated using the openssl utility, using
  * the command : "openssl dhparam -dsaparam -C 512"
  */
+#ifndef S_SPLINT_S
 DH *get_dh512()
 {
        static unsigned char dh512_p[]={
@@ -170,6 +171,7 @@ DH *get_dh512()
        dh->length = 160;
        return(dh);
 }
+#endif /* SPLINT */
 
 struct daemon_remote*
 daemon_remote_create(struct config_file* cfg)
@@ -326,7 +328,7 @@ add_open(const char* ip, int nr, struct listen_port** list, int noproto_is_err,
                if(fd != -1) {
                        if (cfg->username && cfg->username[0])
                                chown(ip, cfg->uid, cfg->gid);
-                       chmod(ip, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP);
+                       chmod(ip, (mode_t)(S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP));
                }
        } else {
                hints.ai_socktype = SOCK_STREAM;
index 243a7b38b57dafca682260f8d5c8ac77de0c6f9b..870c15e3b24916856b52a771abc9afe7e1d50e75 100644 (file)
@@ -606,7 +606,7 @@ create_local_accept_sock(const char *path, int* noproto)
 #endif
        sun.sun_family = AF_LOCAL;
        /* length is 92-108, 104 on FreeBSD */
-       strlcpy(sun.sun_path, path, sizeof(sun.sun_path));
+       (void)strlcpy(sun.sun_path, path, sizeof(sun.sun_path));
 
        if ((s = socket(PF_LOCAL, SOCK_STREAM, 0)) == -1) {
                log_err("Cannot create local socket %s (%s)",
@@ -622,7 +622,7 @@ create_local_accept_sock(const char *path, int* noproto)
        }
 
        if (bind(s, (struct sockaddr *)&sun,
-               sizeof(struct sockaddr_un)) == -1) {
+               (socklen_t)sizeof(struct sockaddr_un)) == -1) {
                log_err("Cannot bind local socket %s (%s)",
                        path, strerror(errno));
                return -1;
index 7595092012835b60196f1c863e5e2a85848375a0..75e2fc86cc9546f6b4bb38da6553204e4f30e06e 100644 (file)
@@ -209,8 +209,8 @@ contact_server(const char* svr, struct config_file* cfg, int statuscmd)
 #ifdef HAVE_STRUCT_SOCKADDR_UN_SUN_LEN
                sun->sun_len = sizeof(sun);
 #endif
-               strlcpy(sun->sun_path, svr, sizeof(sun->sun_path));
-               addrlen = sizeof(struct sockaddr_un);
+               (void)strlcpy(sun->sun_path, svr, sizeof(sun->sun_path));
+               addrlen = (socklen_t)sizeof(struct sockaddr_un);
                addrfamily = AF_LOCAL;
 #endif
        } else {