From 4382f175b37fd5bf4799b1277ad02a229c3c657a Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Sat, 11 Mar 2017 12:43:09 -0600 Subject: [PATCH] Squelch compiler warnings --- spacy/vocab.pyx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/spacy/vocab.pyx b/spacy/vocab.pyx index e7994c127..8d41c48b3 100644 --- a/spacy/vocab.pyx +++ b/spacy/vocab.pyx @@ -366,6 +366,7 @@ cdef class Vocab: cdef size_t st cdef size_t addr cdef hash_t key + cdef LexemeC* lexeme = NULL for key, addr in self._by_hash.items(): lexeme = addr fp.write_from(&lexeme.orth, sizeof(lexeme.orth), 1) @@ -398,10 +399,10 @@ cdef class Vocab: ''' fp = CFile(loc, 'rb', on_open_error=lambda: IOError('LexemeCs file not found at %s' % loc)) - cdef LexemeC* lexeme + cdef LexemeC* lexeme = NULL cdef hash_t key cdef unicode py_str - cdef attr_t orth + cdef attr_t orth = 0 assert sizeof(orth) == sizeof(lexeme.orth) i = 0 while True: @@ -438,10 +439,10 @@ cdef class Vocab: def _deserialize_lexemes(self, CFile fp): '''Load the binary vocabulary data from the given CFile. ''' - cdef LexemeC* lexeme + cdef LexemeC* lexeme = NULL cdef hash_t key cdef unicode py_str - cdef attr_t orth + cdef attr_t orth = 0 assert sizeof(orth) == sizeof(lexeme.orth) i = 0 cdef int todo = fp.size