]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crushtool: fix warning seen on i386
authorColin Patrick McCabe <cmccabe@alumni.cmu.edu>
Fri, 11 Mar 2011 11:19:13 +0000 (03:19 -0800)
committerColin Patrick McCabe <cmccabe@alumni.cmu.edu>
Fri, 11 Mar 2011 11:19:13 +0000 (03:19 -0800)
Fix implicit narrowing warning seen on i386

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
src/crushtool.cc

index fd27eb87b9b08e052f077f8885852baf6fdf6f9d..add1c27e0130abf6f12041dc75644b1542bcb0b2 100644 (file)
@@ -837,7 +837,7 @@ int main(int argc, const char **argv)
       CONF_SAFE_SET_ARG_VAL(&dev, OPT_INT);
       float f;
       CONF_SAFE_SET_ARG_VAL(&f, OPT_FLOAT);
-      int w = f * (float)0x10000;
+      int w = (int)(f * 0x10000);
       if (w < 0)
        w = 0;
       if (w > 0x10000)