]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
TestErasureCodeIsa.cc: Clang want dimensions of arrays to be constant
authorWillem Jan Withagen <wjw@digiware.nl>
Wed, 18 May 2016 12:17:14 +0000 (14:17 +0200)
committerWillem Jan Withagen <wjw@digiware.nl>
Wed, 25 May 2016 10:13:00 +0000 (12:13 +0200)
Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
src/test/erasure-code/TestErasureCodeIsa.cc

index 2c927e23eb525f021fb9f626d7a8c685033b2e9f..2b794ce6c7a424c3acef887ffcd9d17e3ed35d52 100644 (file)
@@ -293,7 +293,7 @@ TEST_F(IsaErasureCodeTest, chunk_size)
     profile["k"] = "2";
     profile["m"] = "1";
     Isa.init(profile, &cerr);
-    int k = 2;
+    const int k = 2;
 
     ASSERT_EQ(EC_ISA_ADDRESS_ALIGNMENT, Isa.get_chunk_size(1));
     ASSERT_EQ(EC_ISA_ADDRESS_ALIGNMENT, Isa.get_chunk_size(EC_ISA_ADDRESS_ALIGNMENT * k - 1));
@@ -305,7 +305,7 @@ TEST_F(IsaErasureCodeTest, chunk_size)
     profile["k"] = "3";
     profile["m"] = "1";
     Isa.init(profile, &cerr);
-    int k = 3;
+    const int k = 3;
 
     ASSERT_EQ(EC_ISA_ADDRESS_ALIGNMENT, Isa.get_chunk_size(1));
     ASSERT_EQ(EC_ISA_ADDRESS_ALIGNMENT, Isa.get_chunk_size(EC_ISA_ADDRESS_ALIGNMENT * k - 1));
@@ -536,8 +536,8 @@ TEST_F(IsaErasureCodeTest, isa_cauchy_exhaustive)
 
   Isa.init(profile, &cerr);
 
-  int k = 12;
-  int m = 4;
+  const int k = 12;
+  const int m = 4;
 
 #define LARGE_ENOUGH 2048
   bufferptr in_ptr(buffer::create_page_aligned(LARGE_ENOUGH));
@@ -663,8 +663,8 @@ TEST_F(IsaErasureCodeTest, isa_cauchy_cache_trash)
 
   Isa.init(profile, &cerr);
 
-  int k = 16;
-  int m = 4;
+  const int k = 16;
+  const int m = 4;
 
 #define LARGE_ENOUGH 2048
   bufferptr in_ptr(buffer::create_page_aligned(LARGE_ENOUGH));
@@ -789,8 +789,8 @@ TEST_F(IsaErasureCodeTest, isa_xor_codec)
   profile["m"] = "1";
   Isa.init(profile, &cerr);
 
-  int k = 4;
-  int m = 1;
+  const int k = 4;
+  const int m = 1;
 
 #define LARGE_ENOUGH 2048
   bufferptr in_ptr(buffer::create_page_aligned(LARGE_ENOUGH));