Module Name: src Committed By: dholland Date: Sat Oct 10 22:34:47 UTC 2015
Modified Files: src/libexec/lfs_cleanerd: Makefile coalesce.c Log Message: Use llabs(), not abs(), on the difference of daddr_t's. Caught by clang, reported by joerg. Turn off the clang-specific compiler flags that were making the report nonfatal. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/libexec/lfs_cleanerd/Makefile cvs rdiff -u -r1.32 -r1.33 src/libexec/lfs_cleanerd/coalesce.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/libexec/lfs_cleanerd/Makefile diff -u src/libexec/lfs_cleanerd/Makefile:1.18 src/libexec/lfs_cleanerd/Makefile:1.19 --- src/libexec/lfs_cleanerd/Makefile:1.18 Tue Mar 4 21:06:47 2014 +++ src/libexec/lfs_cleanerd/Makefile Sat Oct 10 22:34:46 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.18 2014/03/04 21:06:47 joerg Exp $ +# $NetBSD: Makefile,v 1.19 2015/10/10 22:34:46 dholland Exp $ # @(#)Makefile 8.1 (Berkeley) 6/18/93 .include "Makefile.inc" @@ -11,6 +11,4 @@ BINDIR= /libexec LDSTATIC?= -static .endif -CWARNFLAGS.clang+= -Wno-error=absolute-value - .include <bsd.prog.mk> Index: src/libexec/lfs_cleanerd/coalesce.c diff -u src/libexec/lfs_cleanerd/coalesce.c:1.32 src/libexec/lfs_cleanerd/coalesce.c:1.33 --- src/libexec/lfs_cleanerd/coalesce.c:1.32 Wed Aug 12 18:28:00 2015 +++ src/libexec/lfs_cleanerd/coalesce.c Sat Oct 10 22:34:46 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: coalesce.c,v 1.32 2015/08/12 18:28:00 dholland Exp $ */ +/* $NetBSD: coalesce.c,v 1.33 2015/10/10 22:34:46 dholland Exp $ */ /*- * Copyright (c) 2002, 2005 The NetBSD Foundation, Inc. @@ -269,7 +269,7 @@ clean_inode(struct clfs *fs, ino_t ino) for (i = 1; i < nb; i++) { if (bip[i].bi_daddr != bip[i - 1].bi_daddr + lfs_sb_getfrag(fs)) ++noff; - toff += abs(bip[i].bi_daddr - bip[i - 1].bi_daddr + toff += llabs(bip[i].bi_daddr - bip[i - 1].bi_daddr - lfs_sb_getfrag(fs)) >> lfs_sb_getfbshift(fs); }