From: Arnaud Giersch Date: Fri, 4 Jun 2021 07:40:39 +0000 (+0200) Subject: [sonar] Redundant parentheses. X-Git-Tag: v3.28~157 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/420538ebb2f0490d1d311aa3e538fadd68b6eaf6 [sonar] Redundant parentheses. --- diff --git a/src/smpi/mpi/smpi_file.cpp b/src/smpi/mpi/smpi_file.cpp index 8bdbc70109..9dc8f69cfc 100644 --- a/src/smpi/mpi/smpi_file.cpp +++ b/src/smpi/mpi/smpi_file.cpp @@ -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; diff --git a/src/xbt/mmalloc/mm_module.c b/src/xbt/mmalloc/mm_module.c index c3f9b8c924..cd4d7b70f7 100644 --- a/src/xbt/mmalloc/mm_module.c +++ b/src/xbt/mmalloc/mm_module.c @@ -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 diff --git a/src/xbt/mmalloc/swag.c b/src/xbt/mmalloc/swag.c index be383be0bd..e28a4283b1 100644 --- a/src/xbt/mmalloc/swag.c +++ b/src/xbt/mmalloc/swag.c @@ -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; } diff --git a/teshsuite/smpi/coll-allgather/coll-allgather.c b/teshsuite/smpi/coll-allgather/coll-allgather.c index d1432f2d9e..22f4f9f818 100644 --- a/teshsuite/smpi/coll-allgather/coll-allgather.c +++ b/teshsuite/smpi/coll-allgather/coll-allgather.c @@ -70,5 +70,5 @@ int main(int argc, char *argv[]) xbt_free(sb); xbt_free(rb); MPI_Finalize(); - return (EXIT_SUCCESS); + return EXIT_SUCCESS; } diff --git a/teshsuite/smpi/coll-allgatherv/coll-allgatherv.c b/teshsuite/smpi/coll-allgatherv/coll-allgatherv.c index a825d4298d..7838b3fef5 100644 --- a/teshsuite/smpi/coll-allgatherv/coll-allgatherv.c +++ b/teshsuite/smpi/coll-allgatherv/coll-allgatherv.c @@ -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; } diff --git a/teshsuite/smpi/coll-allreduce-with-leaks/coll-allreduce-with-leaks.c b/teshsuite/smpi/coll-allreduce-with-leaks/coll-allreduce-with-leaks.c index 73b6583a33..073a35c4b2 100644 --- a/teshsuite/smpi/coll-allreduce-with-leaks/coll-allreduce-with-leaks.c +++ b/teshsuite/smpi/coll-allreduce-with-leaks/coll-allreduce-with-leaks.c @@ -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; } diff --git a/teshsuite/smpi/coll-allreduce/coll-allreduce.c b/teshsuite/smpi/coll-allreduce/coll-allreduce.c index 2574b72f7d..3962c9e56d 100644 --- a/teshsuite/smpi/coll-allreduce/coll-allreduce.c +++ b/teshsuite/smpi/coll-allreduce/coll-allreduce.c @@ -72,5 +72,5 @@ int main(int argc, char *argv[]) xbt_free(sb); xbt_free(rb); MPI_Finalize(); - return (EXIT_SUCCESS); + return EXIT_SUCCESS; } diff --git a/teshsuite/smpi/coll-alltoall/coll-alltoall.c b/teshsuite/smpi/coll-alltoall/coll-alltoall.c index 90d07e8843..b54076bfbf 100644 --- a/teshsuite/smpi/coll-alltoall/coll-alltoall.c +++ b/teshsuite/smpi/coll-alltoall/coll-alltoall.c @@ -73,5 +73,5 @@ int main(int argc, char *argv[]) xbt_free(sb); xbt_free(rb); MPI_Finalize(); - return (EXIT_SUCCESS); + return EXIT_SUCCESS; } diff --git a/teshsuite/smpi/coll-gather/coll-gather.c b/teshsuite/smpi/coll-gather/coll-gather.c index 4ca54f02ad..6f8077fb0c 100644 --- a/teshsuite/smpi/coll-gather/coll-gather.c +++ b/teshsuite/smpi/coll-gather/coll-gather.c @@ -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; } diff --git a/teshsuite/smpi/coll-reduce/coll-reduce.c b/teshsuite/smpi/coll-reduce/coll-reduce.c index da06af8a07..670aafa85d 100644 --- a/teshsuite/smpi/coll-reduce/coll-reduce.c +++ b/teshsuite/smpi/coll-reduce/coll-reduce.c @@ -93,5 +93,5 @@ int main(int argc, char *argv[]) free(sb); free(rb); MPI_Finalize(); - return (EXIT_SUCCESS); + return EXIT_SUCCESS; }