[cig-commits] [commit] devel, master: Fix out-of-bounds array access warning. (3cae917)
cig_noreply at geodynamics.org
cig_noreply at geodynamics.org
Thu Nov 6 08:17:29 PST 2014
Repository : https://github.com/geodynamics/specfem3d_globe
On branches: devel,master
Link : https://github.com/geodynamics/specfem3d_globe/compare/bc58e579b3b0838a0968725a076f5904845437ca...be63f20cbb6f462104e949894dbe205d2398cd7f
>---------------------------------------------------------------
commit 3cae9179b8721249767f23a97ec5c3feb695adba
Author: Elliott Sales de Andrade <esalesde at physics.utoronto.ca>
Date: Tue May 20 01:51:53 2014 -0400
Fix out-of-bounds array access warning.
Even though this code is not really used without Roland Sylvain
integrals enabled, it still induces warnings.
>---------------------------------------------------------------
3cae9179b8721249767f23a97ec5c3feb695adba
setup/constants.h.in | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/setup/constants.h.in b/setup/constants.h.in
index 4e08472..2008e40 100644
--- a/setup/constants.h.in
+++ b/setup/constants.h.in
@@ -432,8 +432,8 @@
integer, parameter :: NY_OBSERVATION = NX_OBSERVATION
! the code will display sample output values at this particular point as a check
- integer, parameter :: ixr = NX_OBSERVATION / 3
- integer, parameter :: iyr = NY_OBSERVATION / 4
+ integer, parameter :: ixr = max(NX_OBSERVATION / 3, 1)
+ integer, parameter :: iyr = max(NY_OBSERVATION / 4, 1)
integer, parameter :: ichunkr = 3
! how often (every how many spectral elements computed) we print a timestamp to monitor the behavior of the code
More information about the CIG-COMMITS
mailing list