Fluid: Fix strict compiler warning

Proper way to check for DEBUG_PRINT is to do `if defined` check rather
than `if`: this is because in non-debug builds the symbol is not defined.
This commit is contained in:
Sergey Sharybin 2020-11-09 14:34:21 +01:00
parent 055ed335a1
commit 1f4062cf6e
1 changed files with 5 additions and 2 deletions

View File

@ -3207,9 +3207,12 @@ static void update_effectors_task_cb(void *__restrict userdata,
data->force_y[index] = retvel[1];
data->force_z[index] = retvel[2];
# if DEBUG_PRINT
# ifdef DEBUG_PRINT
/* Debugging: Print forces. */
printf("setting force: [%f, %f, %f]\n", data->force_x[index], data->force_y[index], data->force_z[index]);
printf("setting force: [%f, %f, %f]\n",
data->force_x[index],
data->force_y[index],
data->force_z[index]);
# endif
}
}