From 2a09eda4841c67a846a7cdfc5fcf3f02fae58e69 Mon Sep 17 00:00:00 2001
From: Alberto Bertogli <albertito@gmail.com>
Date: Fri, 30 Mar 2007 05:10:10 +0000
Subject: [PATCH 01/31] Cast a parameter in mmap() to properly identify it as a void *.

A sparse run complained about the first mmap() parameter (void *start, we have
it fixed to 0) is an integer being used as a pointer.

We could use NULL, but it might not be 0, and the mmap() manpage recommends it
to be 0, so we cast it to a void * instead.

Signed-off-by: Alberto Bertogli <albertito@gmail.com>
---
 check.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/check.c b/check.c
index 2257d78..95c6b60 100644
--- a/check.c
+++ b/check.c
@@ -248,7 +248,7 @@ int jfsck(const char *name, const char *jdir, struct jfsck_result *res)
 		filelen = lseek(tfd, 0, SEEK_END);
 		/* no overflow problems because we know the transaction size
 		 * is limited to SSIZE_MAX */
-		map = mmap(0, filelen, PROT_READ, MAP_SHARED, tfd, 0);
+		map = mmap((void *) 0, filelen, PROT_READ, MAP_SHARED, tfd, 0);
 		if (map == MAP_FAILED) {
 			res->broken++;
 			map = NULL;
-- 
1.6.2.rc0.226.gf08f

