All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] f2fs-tools: initialize and avoid build warning for android
@ 2016-11-12  2:23 Jaegeuk Kim
  0 siblings, 0 replies; only message in thread
From: Jaegeuk Kim @ 2016-11-12  2:23 UTC (permalink / raw)
  To: linux-f2fs-devel; +Cc: Jaegeuk Kim

This patch initialize one variable for android build.
In addition, it avoids there-in build warnings.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
 lib/libf2fs.c       | 1 +
 lib/libf2fs_zoned.c | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/libf2fs.c b/lib/libf2fs.c
index 74d4d82..93d3da9 100644
--- a/lib/libf2fs.c
+++ b/lib/libf2fs.c
@@ -556,6 +556,7 @@ void f2fs_init_configuration(void)
 
 	for (i = 0; i < MAX_DEVICES; i++) {
 		memset(&c.devices[i], 0, sizeof(struct device_info));
+		c.devices[i].fd = -1;
 		c.devices[i].sector_size = DEFAULT_SECTOR_SIZE;
 		c.devices[i].end_blkaddr = -1;
 		c.devices[i].zoned_model = F2FS_ZONED_NONE;
diff --git a/lib/libf2fs_zoned.c b/lib/libf2fs_zoned.c
index 3c2186a..eebf030 100644
--- a/lib/libf2fs_zoned.c
+++ b/lib/libf2fs_zoned.c
@@ -296,13 +296,13 @@ int f2fs_get_zone_blocks(int i)
 
 int f2fs_check_zones(int i)
 {
-	ERR_MSG("Zoned block devices are not supported\n");
+	ERR_MSG("%d: Zoned block devices are not supported\n", i);
 	return -1;
 }
 
 int f2fs_reset_zones(int i)
 {
-	ERR_MSG("Zoned block devices are not supported\n");
+	ERR_MSG("%d: Zoned block devices are not supported\n", i);
 	return -1;
 }
 
-- 
2.8.3


------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-11-12  2:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-12  2:23 [PATCH] f2fs-tools: initialize and avoid build warning for android Jaegeuk Kim

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.