[MOAB-dev] commit/MOAB: danwu: Fix a few "array subscript is above array bounds" warnings coming from some of the NC helper classes (they had been in the ReadNC class for a long time before the helper classes were introduced).

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Mon Jun 17 09:24:13 CDT 2013


1 new commit in MOAB:

https://bitbucket.org/fathomteam/moab/commits/6d3587341e5a/
Changeset:   6d3587341e5a
Branch:      master
User:        danwu
Date:        2013-06-17 16:23:51
Summary:     Fix a few "array subscript is above array bounds" warnings coming from some of the NC helper classes (they had been in the ReadNC class for a long time before the helper classes were introduced).

Affected #:  2 files

diff --git a/src/io/NCHelperEuler.cpp b/src/io/NCHelperEuler.cpp
index a01d4b8..85b6887 100644
--- a/src/io/NCHelperEuler.cpp
+++ b/src/io/NCHelperEuler.cpp
@@ -147,7 +147,7 @@ ErrorCode NCHelperEuler::init_mesh_vals(const FileOptions& opts, EntityHandle fi
 #ifdef USE_MPI
     for (int i = 0; i < 6; i++)
       parData.gDims[i] = gDims[i];
-    for (int i = 0; i < 3; i++)
+    for (int i = 0; i < 2; i++)
       parData.gPeriodic[i] = globallyPeriodic[i];
     parData.partMethod = partMethod;
     int pdims[3];

diff --git a/src/io/NCHelperFV.cpp b/src/io/NCHelperFV.cpp
index 566b719..93b1a99 100644
--- a/src/io/NCHelperFV.cpp
+++ b/src/io/NCHelperFV.cpp
@@ -158,7 +158,7 @@ ErrorCode NCHelperFV::init_mesh_vals(const FileOptions& opts, EntityHandle file_
 #ifdef USE_MPI
     for (int i = 0; i < 6; i++)
       parData.gDims[i] = gDims[i];
-    for (int i = 0; i < 3; i++)
+    for (int i = 0; i < 2; i++)
       parData.gPeriodic[i] = globallyPeriodic[i];
     parData.partMethod = partMethod;
     int pdims[3];

Repository URL: https://bitbucket.org/fathomteam/moab/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.


More information about the moab-dev mailing list