]> err.no Git - varnish/commitdiff
Flexelint silencing
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Wed, 30 Jan 2008 10:12:58 +0000 (10:12 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Wed, 30 Jan 2008 10:12:58 +0000 (10:12 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2407 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/lib/libvarnish/flopen.c

index 4d2c52404964e78dbac5598eea37cbe3acb85f03..6e79301ffcdef5042adb696be74e143db5649208 100644 (file)
@@ -56,7 +56,7 @@ flopen(const char *path, int flags, ...)
                va_list ap;
 
                va_start(ap, flags);
-               mode = va_arg(ap, int); /* mode_t promoted to int */
+               mode = (mode_t)va_arg(ap, int); /* mode_t promoted to int */
                va_end(ap);
        }
 
@@ -76,32 +76,32 @@ flopen(const char *path, int flags, ...)
                if (fcntl(fd, operation, &lock) == -1) {
                        /* unsupported or interrupted */
                        serrno = errno;
-                       close(fd);
+                       (void)close(fd);
                        errno = serrno;
                        return (-1);
                }
                if (stat(path, &sb) == -1) {
                        /* disappeared from under our feet */
-                       close(fd);
+                       (void)close(fd);
                        continue;
                }
                if (fstat(fd, &fsb) == -1) {
                        /* can't happen [tm] */
                        serrno = errno;
-                       close(fd);
+                       (void)close(fd);
                        errno = serrno;
                        return (-1);
                }
                if (sb.st_dev != fsb.st_dev ||
                    sb.st_ino != fsb.st_ino) {
                        /* changed under our feet */
-                       close(fd);
+                       (void)close(fd);
                        continue;
                }
                if (trunc && ftruncate(fd, 0) != 0) {
                        /* can't happen [tm] */
                        serrno = errno;
-                       close(fd);
+                       (void)close(fd);
                        errno = serrno;
                        return (-1);
                }