Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SWIFT
SWIFTsim
Commits
9688d6ee
Commit
9688d6ee
authored
Feb 16, 2019
by
Matthieu Schaller
Browse files
Error messages in the task_acts_on() function only when using debugging checks.
parent
a3505366
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/task.c
View file @
9688d6ee
...
...
@@ -151,6 +151,7 @@ __attribute__((always_inline)) INLINE static enum task_actions task_acts_on(
case
task_type_star_formation
:
return
task_action_all
;
case
task_type_drift_spart
:
case
task_type_stars_ghost
:
case
task_type_stars_sort
:
return
task_action_spart
;
...
...
@@ -180,7 +181,10 @@ __attribute__((always_inline)) INLINE static enum task_actions task_acts_on(
break
;
default:
error
(
"Unknow task_action for task"
);
#ifdef SWIFT_DEBUG_CHECKS
error
(
"Unknown task_action for task %s/%s"
,
taskID_names
[
t
->
type
],
subtaskID_names
[
t
->
subtype
]);
#endif
return
task_action_none
;
break
;
}
...
...
@@ -199,8 +203,11 @@ __attribute__((always_inline)) INLINE static enum task_actions task_acts_on(
return
task_action_part
;
else
if
(
t
->
ci
->
grav
.
count
>
0
)
return
task_action_gpart
;
else
else
{
#ifdef SWIFT_DEBUG_CHECKS
error
(
"Task without particles"
);
#endif
}
break
;
case
task_type_init_grav
:
...
...
@@ -216,13 +223,19 @@ __attribute__((always_inline)) INLINE static enum task_actions task_acts_on(
break
;
default:
error
(
"Unknown task_action for task"
);
#ifdef SWIFT_DEBUG_CHECKS
error
(
"Unknown task_action for task %s/%s"
,
taskID_names
[
t
->
type
],
subtaskID_names
[
t
->
subtype
]);
#endif
return
task_action_none
;
break
;
}
/* Silence compiler warnings */
error
(
"Unknown task_action for task"
);
#ifdef SWIFT_DEBUG_CHECKS
error
(
"Unknown task_action for task %s/%s"
,
taskID_names
[
t
->
type
],
subtaskID_names
[
t
->
subtype
]);
#endif
/* Silence compiler warnings. We should never get here. */
return
task_action_none
;
}
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment