Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Chameleon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
solverstack
Chameleon
Commits
f77bf06c
Commit
f77bf06c
authored
2 years ago
by
Mathieu Faverge
Browse files
Options
Downloads
Patches
Plain Diff
sonarqube: add protection on NULL parameters to remove sonarqube issues
parent
7f997776
No related branches found
No related tags found
1 merge request
!375
Sonarqube: Fix a bunch of small bugs and code smells
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
runtime/starpu/control/runtime_tags.c
+10
-1
10 additions, 1 deletion
runtime/starpu/control/runtime_tags.c
runtime/starpu/include/chameleon_starpu.h.in
+1
-1
1 addition, 1 deletion
runtime/starpu/include/chameleon_starpu.h.in
testing/parameters.c
+7
-1
7 additions, 1 deletion
testing/parameters.c
with
18 additions
and
3 deletions
runtime/starpu/control/runtime_tags.c
+
10
−
1
View file @
f77bf06c
...
@@ -179,6 +179,15 @@ chameleon_starpu_tag_release( int64_t min )
...
@@ -179,6 +179,15 @@ chameleon_starpu_tag_release( int64_t min )
current
=
current
->
next
;
current
=
current
->
next
;
}
}
if
(
current
==
NULL
)
{
#if defined(CHAMELEON_DEBUG_STARPU)
fprintf
(
stderr
,
"chameleon_starpu_tag: FAILED to release [%ld,...] no set registered with this min value
\n
"
,
min
);
#endif
return
;
}
assert
(
current
!=
NULL
);
assert
(
current
!=
NULL
);
assert
(
current
->
min
==
min
);
assert
(
current
->
min
==
min
);
...
@@ -212,7 +221,7 @@ chameleon_starpu_tag_release( int64_t min )
...
@@ -212,7 +221,7 @@ chameleon_starpu_tag_release( int64_t min )
* @retval TODO
* @retval TODO
*
*
******************************************************************************/
******************************************************************************/
int
void
chameleon_starpu_tag_init
(
)
{
chameleon_starpu_tag_init
(
)
{
return
CHAMELEON_SUCCESS
;
return
CHAMELEON_SUCCESS
;
}
}
...
...
This diff is collapsed.
Click to expand it.
runtime/starpu/include/chameleon_starpu.h.in
+
1
−
1
View file @
f77bf06c
...
@@ -152,7 +152,7 @@ typedef struct starpu_option_request_s {
...
@@ -152,7 +152,7 @@ typedef struct starpu_option_request_s {
/**
/**
* MPI tag management
* MPI tag management
*/
*/
int
chameleon_starpu_tag_init( );
void
chameleon_starpu_tag_init( );
int64_t chameleon_starpu_tag_book( int64_t nbtags );
int64_t chameleon_starpu_tag_book( int64_t nbtags );
void chameleon_starpu_tag_release( int64_t min );
void chameleon_starpu_tag_release( int64_t min );
...
...
This diff is collapsed.
Click to expand it.
testing/parameters.c
+
7
−
1
View file @
f77bf06c
...
@@ -305,7 +305,13 @@ void
...
@@ -305,7 +305,13 @@ void
parameters_read
(
parameter_t
*
param
,
parameters_read
(
parameter_t
*
param
,
const
char
*
values
)
const
char
*
values
)
{
{
int
range
=
(
values
!=
NULL
)
&&
(
strchr
(
values
,
':'
)
!=
NULL
);
int
range
;
if
(
values
==
NULL
)
{
fprintf
(
stderr
,
"Error passing NULL parameter to read
\n
"
);
exit
(
EXIT_FAILURE
);
}
range
=
(
values
!=
NULL
)
&&
(
strchr
(
values
,
':'
)
!=
NULL
);
/* If we have a ranged of integer values */
/* If we have a ranged of integer values */
if
(
range
)
if
(
range
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment