Skip to contentSkip to conversation

reiserfsprogs: fix printf formatting warnings

PATCH New Jeff Mahoney 1 participant 1 message Oct 11, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 3/10 reiserfsprogs: fix printf formatting warnings

This patch fixes:
main.c:968:11: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 3 has type ‘time_t’ [-Wformat] prints.c:152:7: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘__u32’ [-Wformat]

---
 fsck/main.c           |    2 +-
 reiserfscore/prints.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
fsck/main.c +1 -1
index 911af8d..e4253af 100644
@@ -964,7 +964,7 @@ static int reiserfs_check_auto_state(reiserfs_filsys_t *fs)
 	}
 
 	if (interval != UINT_MAX && now > lastcheck + interval) {
-		fprintf(stderr, "File system hasn't been checked in %u days. "
+		fprintf(stderr, "File system hasn't been checked in %lu days. "
 		        "Checking now.\n", (now - lastcheck) / (60*60*24));
 		return 1;
 	}
reiserfscore/prints.c +1 -1
index e68ef01..ffe86fc 100644
@@ -148,7 +148,7 @@ static int print_disk_child (FILE * stream,
     int len;
 
     dc = *((const struct disk_child **)(args[0]));
-    len = asprintf (&buffer, "[dc_number=%lu, dc_size=%u]", get_dc_child_blocknr (dc),
+    len = asprintf (&buffer, "[dc_number=%u, dc_size=%u]", get_dc_child_blocknr (dc),
 		    get_dc_child_size (dc));
     FPRINTF;
 }
Signature · 7 lines
1.7.10.4


--
To unsubscribe from this list: send the line "unsubscribe reiserfs-devel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html