Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
fix some long -> double faulty convertions reported by sonar
authorMartin Quinson <martin.quinson@ens-rennes.fr>
Sat, 13 Jun 2020 12:55:31 +0000 (14:55 +0200)
committerMartin Quinson <martin.quinson@ens-rennes.fr>
Sat, 13 Jun 2020 12:55:31 +0000 (14:55 +0200)
examples/s4u/async-waituntil/s4u-async-waituntil.cpp
src/xbt/config.cpp

index f2a7c83..d63273f 100644 (file)
@@ -21,8 +21,8 @@ static void sender(int argc, char** argv)
 {
   xbt_assert(argc == 4, "Expecting 3 parameters from the XML deployment file but got %d", argc);
   long messages_count  = std::stol(argv[1]); /* - number of messages */
-  double msg_size      = std::stol(argv[2]); /* - message size in bytes */
-  long receivers_count = std::stod(argv[3]); /* - number of receivers */
+  double msg_size      = std::stod(argv[2]); /* - message size in bytes */
+  long receivers_count = std::stol(argv[3]); /* - number of receivers */
 
   std::vector<simgrid::s4u::CommPtr> pending_comms;
 
index 8d05c90..e3b4f9a 100644 (file)
@@ -97,7 +97,7 @@ template <class T> class ConfigType;
 template <> class ConfigType<int> {
 public:
   static constexpr const char* type_name = "int";
-  static inline double parse(const char* value)
+  static inline int parse(const char* value)
   {
     return parse_long(value);
   }