From 957349aa1e5a3e4d5ceb700dfa2496aeeadcc557 Mon Sep 17 00:00:00 2001
From: Christoph Groth <christoph.groth@cea.fr>
Date: Wed, 21 Oct 2015 15:09:23 +0200
Subject: [PATCH] silence some cython warnings

---
 kwant/graph/c_slicer.pxd | 3 ++-
 kwant/graph/core.pyx     | 6 ++++--
 kwant/linalg/cmumps.pxd  | 6 ++++--
 3 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/kwant/graph/c_slicer.pxd b/kwant/graph/c_slicer.pxd
index 67a45c04..9e692a55 100644
--- a/kwant/graph/c_slicer.pxd
+++ b/kwant/graph/c_slicer.pxd
@@ -11,7 +11,8 @@ from defs cimport gint
 cdef extern from "c_slicer/slicer.h":
     struct Slicing:
         int nslices
-        int *slice_ptr, *slices
+        int *slice_ptr
+        int *slices
 
     Slicing *slice(gint, gint *, gint *, gint, gint *,
                    gint, gint *)
diff --git a/kwant/graph/core.pyx b/kwant/graph/core.pyx
index d76bb36f..c60d5165 100644
--- a/kwant/graph/core.pyx
+++ b/kwant/graph/core.pyx
@@ -202,8 +202,10 @@ cdef class Graph:
                                                   self.num_pp_edges,
                                                   self.num_pn_edges,
                                                   self.num_np_edges)
-        cdef gint *hbuf = result.heads_idxs + 1, *heads = result.heads
-        cdef gint *tbuf = result.tails_idxs + 1, *tails = result.tails
+        cdef gint *hbuf = result.heads_idxs + 1
+        cdef gint *heads = result.heads
+        cdef gint *tbuf = result.tails_idxs + 1
+        cdef gint *tails = result.tails
         cdef gint *edge_ids = result.edge_ids
         cdef gint edge_id = 0, num_edges     # = 0 is there to silence warning.
         cdef Edge *edge
diff --git a/kwant/linalg/cmumps.pxd b/kwant/linalg/cmumps.pxd
index 29785c1b..1d60a3ee 100644
--- a/kwant/linalg/cmumps.pxd
+++ b/kwant/linalg/cmumps.pxd
@@ -45,8 +45,10 @@ cdef extern from "zmumps_c.h":
         MUMPS_INT nrhs, lrhs
         ZMUMPS_COMPLEX *rhs
 
-        MUMPS_INT info[40], infog[40]
-        ZMUMPS_REAL rinfo[40], rinfog[40]
+        MUMPS_INT info[40]
+        MUMPS_INT infog[40]
+        ZMUMPS_REAL rinfo[40]
+        ZMUMPS_REAL rinfog[40]
 
         MUMPS_INT nz_rhs
         ZMUMPS_COMPLEX *rhs_sparse
-- 
GitLab