Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[sonar] Constify pointer and reference local variables in examples/.
[simgrid.git] / examples / s4u / io-file-system / s4u-io-file-system.cpp
index 6a74e1b..fe5ad8d 100644 (file)
@@ -57,7 +57,7 @@ public:
 
     // Test attaching some user data to the file
     file->set_data(new std::string("777"));
-    std::string* file_data = static_cast<std::string*>(file->get_data());
+    const std::string* file_data = static_cast<std::string*>(file->get_data());
     XBT_INFO("User data attached to the file: %s", file_data->c_str());
     delete file_data;