Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Update copyright lines for 2023.
[simgrid.git] / teshsuite / mc / random-bug / random-bug.cpp
index 01f9239..9bade15 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2014-2021. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2014-2023. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -30,9 +30,11 @@ static void app()
     if (x == 3 && y == 4)
       abort();
   } else if (behavior == Behavior::SEGV) {
-    int* A = 0;
+#ifndef __clang_analyzer__
+    int* A = nullptr;
     if (x == 3 && y == 4)
       *A = 1;
+#endif
   } else {
     DIE_IMPOSSIBLE;
   }
@@ -62,6 +64,6 @@ int main(int argc, char* argv[])
 
   e.load_platform(argv[2]);
 
-  simgrid::s4u::Actor::create("app", simgrid::s4u::Host::by_name("Fafard"), &app);
+  simgrid::s4u::Actor::create("app", e.host_by_name("Fafard"), &app);
   e.run();
 }