Commit 8b2e33c3 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Fix a few warning when compiling the unit tests in C++

parent 6dde26d1
......@@ -70,7 +70,8 @@ int main(int argc, char *argv[]) {
/* Fake parameter file with Planck+13 cosmology
* and the usual cosmological system of units */
struct swift_params *params = malloc(sizeof(struct swift_params));
struct swift_params *params =
(swift_params *)malloc(sizeof(struct swift_params));
parser_set_param(params, "InternalUnitSystem:UnitMass_in_cgs:1.98848e43");
parser_set_param(params,
"InternalUnitSystem:UnitLength_in_cgs:3.08567758e24");
......
......@@ -44,7 +44,7 @@ const double a_values[Ntest] = {
0.5,
};
void test_no_cosmo(struct engine *e, char *name, int with_assert) {
void test_no_cosmo(struct engine *e, const char *name, const int with_assert) {
message("Testing output time for %s without cosmology", name);
struct output_list *list;
......@@ -56,7 +56,7 @@ void test_no_cosmo(struct engine *e, char *name, int with_assert) {
e->time_end = 14;
e->time_base = (e->time_end - e->time_begin) / max_nr_timesteps;
e->ti_current = 0;
e->policy = !engine_policy_cosmology;
e->policy = 0;
/* initialize output_list */
output_list_init(&list, e, name, &delta_time, &output_time);
......@@ -82,7 +82,7 @@ void test_no_cosmo(struct engine *e, char *name, int with_assert) {
output_list_clean(&list);
};
void test_cosmo(struct engine *e, char *name, int with_assert) {
void test_cosmo(struct engine *e, const char *name, const int with_assert) {
message("Testing output time for %s with cosmology", name);
struct output_list *list;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment