biod.pnpi.spb.ru
/
alexxy
/
gromacs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Avoid array-bounds warnings with gcc 4.8.2
[alexxy/gromacs.git]
/
src
/
gromacs
/
gmxlib
/
pbc.c
diff --git
a/src/gromacs/gmxlib/pbc.c
b/src/gromacs/gmxlib/pbc.c
index b9e48a236f525387c747e9c806da3c663b61f903..c2ceaef80d67c6ba9f39281e2b3024c1f2ee56e5 100644
(file)
--- a/
src/gromacs/gmxlib/pbc.c
+++ b/
src/gromacs/gmxlib/pbc.c
@@
-39,6
+39,8
@@
#endif
#include <math.h>
+#include <assert.h>
+
#include "sysstuff.h"
#include "typedefs.h"
#include "vec.h"
@@
-395,6
+397,7
@@
static void low_set_pbc(t_pbc *pbc, int ePBC, ivec *dd_nc, matrix box)
pbc->dim = i;
}
}
+ assert(pbc->dim < DIM);
for (i = 0; i < pbc->dim; i++)
{
if (pbc->box[pbc->dim][i] != 0)