Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[sonar] Don't name unused exceptions.
[simgrid.git] / teshsuite / xbt / mmalloc / mmalloc_test.cpp
index 18fdca9..1220c58 100644 (file)
@@ -17,8 +17,9 @@
 
 XBT_LOG_NEW_DEFAULT_CATEGORY(test,"this test");
 
-#define BUFFSIZE 204800
-#define TESTSIZE 100
+constexpr int BUFFSIZE = 204800;
+constexpr int TESTSIZE = 100;
+
 #define size_of_block(i) (((i % 50)+1)* 100)
 
 static void check_block(const void* s, int c, int n)
@@ -76,7 +77,7 @@ int main(int argc, char**argv)
     mfree(heapA, pointers[i]);
     try {
       mfree(heapA, pointers[i]);
-    } catch(xbt_ex& e) {
+    } catch (const xbt_ex&) {
       gotit = true;
     }
     if (not gotit)
@@ -88,7 +89,7 @@ int main(int argc, char**argv)
     bool gotit = false;
     try {
       mfree(heapA, pointers[i]);
-    } catch(xbt_ex& e) {
+    } catch (const xbt_ex&) {
       gotit = true;
     }
     if (not gotit)