From e32fb4f7779c80e1f332cc339de669e686dd76be Mon Sep 17 00:00:00 2001 From: Jason Douglas Date: Fri, 29 Sep 2017 13:21:26 -0700 Subject: [PATCH] Move variable declaration to top of block --- _webp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_webp.c b/_webp.c index dcb2e29b5..08fa39dc7 100644 --- a/_webp.c +++ b/_webp.c @@ -34,6 +34,7 @@ static const char* const kErrorMessages[-WEBP_MUX_NOT_ENOUGH_DATA + 1] = { }; PyObject* HandleMuxError(WebPMuxError err, char* chunk) { + char message[100]; assert(err <= WEBP_MUX_NOT_FOUND && err >= WEBP_MUX_NOT_ENOUGH_DATA); // Check for a memory error first @@ -42,7 +43,6 @@ PyObject* HandleMuxError(WebPMuxError err, char* chunk) { } // Create the error message - char message[100]; if (chunk == NULL) { sprintf(message, "could not assemble chunks: %s", kErrorMessages[-err]); } else {