]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
travis: turn on -Werror
authorEvgeny Vereshchagin <evvers@ya.ru>
Thu, 2 Jul 2020 09:15:51 +0000 (09:15 +0000)
committerEvgeny Vereshchagin <evvers@ya.ru>
Thu, 2 Jul 2020 09:49:12 +0000 (09:49 +0000)
.travis-functions.sh
sys-utils/blkzone.c

index 805a5104ffd1c13e5826829a7567de3c081e8907..d8908670e78511c55850e4ada5b5352294820f02 100755 (executable)
@@ -74,6 +74,8 @@ function check_nonroot
                make_opts="$make_opts --memcheck-asan"
        fi
 
+       conf_opts="$conf_opts --enable-werror"
+
        xconfigure $conf_opts || return
        $MAKE || return
 
@@ -97,6 +99,8 @@ function check_root
                make_opts="$make_opts --memcheck-asan"
        fi
 
+       conf_opts="$conf_opts --enable-werror"
+
        xconfigure $conf_opts || return
        $MAKE || return
 
index 11e90fb0ef349153139d93a211e6aaedf91540b4..2e00a2823a98012c606d69bf1b9436bc9dd704a1 100644 (file)
@@ -256,7 +256,14 @@ static int blkzone_report(struct blkzone_control *ctl)
                        break;
 
                for (i = 0; i < zi->nr_zones; i++) {
+/*
+ * blk_zone_report hasn't been packed since https://github.com/torvalds/linux/commit/b3e7e7d2d668de0102264302a4d10dd9d4438a42
+ * was merged. See https://github.com/karelzak/util-linux/issues/1083
+ */
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
                        const struct blk_zone *entry = &zi->zones[i];
+#pragma GCC diagnostic pop
                        unsigned int type = entry->type;
                        uint64_t start = entry->start;
                        uint64_t wp = entry->wp;