diff options
author | hinder <hinder@578cdeb0-5ea1-4b81-8215-5a3b8777ee0b> | 2012-11-26 12:12:53 +0000 |
---|---|---|
committer | hinder <hinder@578cdeb0-5ea1-4b81-8215-5a3b8777ee0b> | 2012-11-26 12:12:53 +0000 |
commit | 15f9511f821e350bc8c0c850b6f0a65ff786df87 (patch) | |
tree | d87c03ebcd652bbf8df8de3667df9eb3c3203858 /src/SetTime.c | |
parent | 5116123ac33f875c3d8f4a77ce6489a2956881bb (diff) |
Set variables in error branch of conditionals to avoid compiler warnings
The compiler doesn't know that CCTK_WARN(0,…) is fatal.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusNumerical/MoL/trunk@189 578cdeb0-5ea1-4b81-8215-5a3b8777ee0b
Diffstat (limited to 'src/SetTime.c')
-rw-r--r-- | src/SetTime.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/SetTime.c b/src/SetTime.c index 969c95a..edef89f 100644 --- a/src/SetTime.c +++ b/src/SetTime.c @@ -284,6 +284,8 @@ void MoL_ResetTime(CCTK_ARGUMENTS) else { CCTK_WARN (0, "internal error"); + /* Avoid compiler warning */ + alpha_array = NULL; } cctkGH->cctk_time = ((* Original_Time) @@ -463,7 +465,9 @@ void MoL_ResetDeltaTime(CCTK_ARGUMENTS) } else { - CCTK_WARN (0, "internal error"); + CCTK_WARN (0, "internal error"); + /* Avoid compiler warning */ + alpha_array = NULL; } cctkGH->cctk_delta_time = ((alpha_array[substep + 1] - alpha_array[substep]) |