Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[sonar] Redundant parentheses.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Fri, 4 Jun 2021 07:40:39 +0000 (09:40 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Fri, 4 Jun 2021 08:16:39 +0000 (10:16 +0200)
src/smpi/mpi/smpi_file.cpp
src/xbt/mmalloc/mm_module.c
src/xbt/mmalloc/swag.c
teshsuite/smpi/coll-allgather/coll-allgather.c
teshsuite/smpi/coll-allgatherv/coll-allgatherv.c
teshsuite/smpi/coll-allreduce-with-leaks/coll-allreduce-with-leaks.c
teshsuite/smpi/coll-allreduce/coll-allreduce.c
teshsuite/smpi/coll-alltoall/coll-alltoall.c
teshsuite/smpi/coll-gather/coll-gather.c
teshsuite/smpi/coll-reduce/coll-reduce.c

index 8bdbc70..9dc8f69 100644 (file)
@@ -121,15 +121,15 @@ namespace smpi{
 
   int File::seek(MPI_Offset offset, int whence){
     switch(whence){
-      case(MPI_SEEK_SET):
+      case MPI_SEEK_SET:
         XBT_VERB("Seeking in MPI_File %s, setting offset %lld", file_->get_path(), offset);
         file_->seek(offset,SEEK_SET);
         break;
-      case(MPI_SEEK_CUR):
+      case MPI_SEEK_CUR:
         XBT_VERB("Seeking in MPI_File %s, current offset + %lld", file_->get_path(), offset);
         file_->seek(offset,SEEK_CUR);
         break;
-      case(MPI_SEEK_END):
+      case MPI_SEEK_END:
         XBT_VERB("Seeking in MPI_File %s, end offset + %lld", file_->get_path(), offset);
         file_->seek(offset,SEEK_END);
         break;
index c3f9b8c..cd4d7b7 100644 (file)
@@ -93,7 +93,7 @@ xbt_mheap_t xbt_mheap_new_options(int fd, void *baseaddr, int options)
 
   if (fd >= 0) {
     if (fstat(fd, &sbuf) < 0)
-      return (NULL);
+      return NULL;
 
     else if (sbuf.st_size > 0) {
       /* We were given a valid file descriptor on an open file, so try to remap
@@ -159,7 +159,7 @@ xbt_mheap_t xbt_mheap_new_options(int fd, void *baseaddr, int options)
 
   /* NULL is not a valid baseaddr as we cannot map anything there. C'mon, user. Think! */
   if (baseaddr == NULL)
-    return (NULL);
+    return NULL;
 
   /* We start off with the malloc descriptor allocated on the stack, until we build it up enough to
    * call _mmalloc_mmap_morecore() to allocate the first page of the region and copy it there.  Ensure that it is
index be383be..e28a428 100644 (file)
@@ -23,7 +23,7 @@ typedef const struct xbt_swag* const_xbt_swag_t;
 
 static inline void *xbt_swag_getFirst(const_xbt_swag_t swag)
 {
-  return (swag->head);
+  return swag->head;
 }
 
 /*
@@ -124,5 +124,5 @@ static inline void *xbt_swag_remove(void *obj, xbt_swag_t swag)
  */
 static inline int xbt_swag_size(const_xbt_swag_t swag)
 {
-  return (swag->count);
+  return swag->count;
 }
index d1432f2..22f4f9f 100644 (file)
@@ -70,5 +70,5 @@ int main(int argc, char *argv[])
   xbt_free(sb);
   xbt_free(rb);
   MPI_Finalize();
-  return (EXIT_SUCCESS);
+  return EXIT_SUCCESS;
 }
index a825d42..7838b3f 100644 (file)
@@ -86,5 +86,5 @@ int main(int argc, char *argv[])
   xbt_free(recv_counts);
   xbt_free(recv_disps);
   MPI_Finalize();
-  return (EXIT_SUCCESS);
+  return EXIT_SUCCESS;
 }
index 73b6583..073a35c 100644 (file)
@@ -40,5 +40,5 @@ int main(int argc, char *argv[])
   }
   //Do not free dup and rb/sb
   MPI_Finalize();
-  return (EXIT_SUCCESS);
+  return EXIT_SUCCESS;
 }
index 2574b72..3962c9e 100644 (file)
@@ -72,5 +72,5 @@ int main(int argc, char *argv[])
   xbt_free(sb);
   xbt_free(rb);
   MPI_Finalize();
-  return (EXIT_SUCCESS);
+  return EXIT_SUCCESS;
 }
index 90d07e8..b54076b 100644 (file)
@@ -73,5 +73,5 @@ int main(int argc, char *argv[])
   xbt_free(sb);
   xbt_free(rb);
   MPI_Finalize();
-  return (EXIT_SUCCESS);
+  return EXIT_SUCCESS;
 }
index 4ca54f0..6f8077f 100644 (file)
@@ -73,5 +73,5 @@ int main(int argc, char *argv[])
   xbt_free(rb);
   MPI_Barrier(MPI_COMM_WORLD);
   MPI_Finalize();
-  return (EXIT_SUCCESS);
+  return EXIT_SUCCESS;
 }
index da06af8..670aafa 100644 (file)
@@ -93,5 +93,5 @@ int main(int argc, char *argv[])
   free(sb);
   free(rb);
   MPI_Finalize();
-  return (EXIT_SUCCESS);
+  return EXIT_SUCCESS;
 }