[lvm-devel] master - cleanup: avoid overflow warning

Zdenek Kabelac zkabelac at fedoraproject.org
Tue Feb 5 13:47:33 UTC 2013


Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=7cd25062acc5c54959e892381600257372ef071f
Commit:        7cd25062acc5c54959e892381600257372ef071f
Parent:        d7ea12f222bb40d0bdd523a6072c5771053f75c1
Author:        Zdenek Kabelac <zkabelac at redhat.com>
AuthorDate:    Mon Feb 4 20:32:21 2013 +0100
Committer:     Zdenek Kabelac <zkabelac at redhat.com>
CommitterDate: Tue Feb 5 14:27:25 2013 +0100

cleanup: avoid overflow warning

Even we do not expect to support chunks bigger then 2GB.
---
 tools/toollib.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tools/toollib.c b/tools/toollib.c
index 669d772..1abe837 100644
--- a/tools/toollib.c
+++ b/tools/toollib.c
@@ -1617,7 +1617,7 @@ int update_pool_params(struct cmd_context *cmd, unsigned attr,
 				(2 * DEFAULT_THIN_POOL_MAX_METADATA_SIZE *
 				 (SECTOR_SIZE / UINT64_C(64)));
 			log_warn("WARNING: Chunk size is too small for pool, suggested minimum is %s.",
-				 display_size(cmd, 1 << (int)(ffs(estimate_chunk_size) + 1)));
+				 display_size(cmd, UINT64_C(1) << (ffs(estimate_chunk_size) + 1)));
 		}
 
 		/* Round up to extent size */




More information about the lvm-devel mailing list