diff options
author | mattip <matti.picus@gmail.com> | 2020-01-15 08:12:33 +1100 |
---|---|---|
committer | mattip <matti.picus@gmail.com> | 2020-01-17 18:27:38 +1100 |
commit | 18ab0d378bd1fef28703c56a5f3d48c9859b1d2a (patch) | |
tree | 490b181b1653883543494d230b850d3bffe34c8b /numpy | |
parent | 879d0e43a0509641084a4286bf3159f1d54180d8 (diff) | |
download | numpy-18ab0d378bd1fef28703c56a5f3d48c9859b1d2a.tar.gz |
MAINT: try to avoid spurious warnings in einsum
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/core/src/multiarray/einsum.c.src | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/numpy/core/src/multiarray/einsum.c.src b/numpy/core/src/multiarray/einsum.c.src index 70af3fef9..1cc557825 100644 --- a/numpy/core/src/multiarray/einsum.c.src +++ b/numpy/core/src/multiarray/einsum.c.src @@ -2152,6 +2152,11 @@ get_combined_dims_view(PyArrayObject *op, int iop, char *labels) } /* A repeated label, find the original one and merge them. */ else { +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wuninitialized" +#pragma GCC diagnostic ignored "-Wmaybe-uninitialized" +#endif int i = icombinemap[idim + label]; icombinemap[idim] = -1; @@ -2164,6 +2169,9 @@ get_combined_dims_view(PyArrayObject *op, int iop, char *labels) return NULL; } new_strides[i] += stride; +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif } } |