]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test: osd/TestOSDMap.cc: fix Clang complain about promotion 15525/head
authorWillem Jan Withagen <wjw@digiware.nl>
Tue, 6 Jun 2017 21:35:18 +0000 (23:35 +0200)
committerWillem Jan Withagen <wjw@digiware.nl>
Tue, 6 Jun 2017 21:35:18 +0000 (23:35 +0200)
/home/jenkins/workspace/ceph-freebsd/src/test/osd/TestOSDMap.cc:444:15: error: non-constant-expression cannot be narrowed from type 'unsigned int' to 'int' in initializer list [-Wc++11-narrowing]
    m.set(x, {i});
              ^
/home/jenkins/workspace/ceph-freebsd/src/test/osd/TestOSDMap.cc:444:15: note: insert an explicit cast to silence this issue
    m.set(x, {i});
              ^
              static_cast<int>( )
1 error generated.

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
src/test/osd/TestOSDMap.cc

index b8258d4a1a4edb996226b5ed03595f1ee6b94602..4149ba5f5507bbb980aea73bb03cb8ebc9607af7 100644 (file)
@@ -441,7 +441,7 @@ TEST(PGTempMap, basic)
   pg_t a(1,1);
   for (unsigned i=3; i<1000; ++i) {
     pg_t x(i, 1);
-    m.set(x, {i});
+    m.set(x, {static_cast<int>(i)});
   }
   pg_t b(2,1);
   m.set(a, {1, 2});