diff mbox

debugfs: use labs() for absolute value of a long

Message ID 1470775451-69146-1-git-send-email-adilger@dilger.ca
State Rejected, archived
Headers show

Commit Message

Andreas Dilger Aug. 9, 2016, 8:44 p.m. UTC
Use labs() instead of abs() for calculated value of a long int
to quiet warning from LLVM.

Signed-off-by: Andreas Dilger <adilger@dilger.ca>
---
 debugfs/lsdel.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Theodore Ts'o Aug. 10, 2016, 9:52 p.m. UTC | #1
On Tue, Aug 09, 2016 at 02:44:11PM -0600, Andreas Dilger wrote:
> Use labs() instead of abs() for calculated value of a long int
> to quiet warning from LLVM.
> 
> Signed-off-by: Andreas Dilger <adilger@dilger.ca>

I'm not sure what version of e2fsprogs you're using for your base, but
this was fixed in commit 82e48fb1637: "Fix various clang and gcc -Wall
warnings" --- and this commit is in 1.43.  Are you using an old
pre-1.43 branch, possibly?

					- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/debugfs/lsdel.c b/debugfs/lsdel.c
index e5b2d20..0d74590 100644
--- a/debugfs/lsdel.c
+++ b/debugfs/lsdel.c
@@ -133,7 +133,7 @@  void do_lsdel(int argc, char **argv)
 
 	while (ino) {
 		if ((inode.i_dtime == 0) ||
-		    (secs && ((unsigned) abs(now - secs) > inode.i_dtime)))
+		    (secs && ((unsigned)labs(now - secs) > inode.i_dtime)))
 			goto next;
 
 		lsd.inode = ino;