From 525ba37722c43cc5942016ba914fffc97d343b26 Mon Sep 17 00:00:00 2001 From: Christoph Gohlke Date: Thu, 30 Jun 2016 14:04:53 -0700 Subject: [PATCH] Fix msvc9/10 compile error --- libImaging/Jpeg2KDecode.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libImaging/Jpeg2KDecode.c b/libImaging/Jpeg2KDecode.c index b0cefe278..250860009 100644 --- a/libImaging/Jpeg2KDecode.c +++ b/libImaging/Jpeg2KDecode.c @@ -56,10 +56,11 @@ j2k_read(void *p_buffer, OPJ_SIZE_T p_nb_bytes, void *p_user_data) static OPJ_OFF_T j2k_skip(OPJ_OFF_T p_nb_bytes, void *p_user_data) { + off_t pos; ImagingCodecState state = (ImagingCodecState)p_user_data; _imaging_seek_pyFd(state->fd, p_nb_bytes, SEEK_CUR); - off_t pos = _imaging_tell_pyFd(state->fd); + pos = _imaging_tell_pyFd(state->fd); return pos ? pos : (OPJ_OFF_T)-1; }