diff --git a/c/tools/brotli.c b/c/tools/brotli.c
index 7c678d3..8f55f2f 100644
--- a/c/tools/brotli.c
+++ b/c/tools/brotli.c
@@ -876,6 +876,7 @@ static void PrintFileProcessingProgress(Context* context) {
 }
 
 static BROTLI_BOOL DecompressFile(Context* context, BrotliDecoderState* s) {
+  int has_more_input;
   BrotliDecoderResult result = BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT;
   InitializeBuffers(context);
   for (;;) {
@@ -890,7 +891,7 @@ static BROTLI_BOOL DecompressFile(Context* context, BrotliDecoderState* s) {
       if (!ProvideOutput(context)) return BROTLI_FALSE;
     } else if (result == BROTLI_DECODER_RESULT_SUCCESS) {
       if (!FlushOutput(context)) return BROTLI_FALSE;
-      int has_more_input =
+      has_more_input =
           (context->available_in != 0) || (fgetc(context->fin) != EOF);
       if (has_more_input) {
         fprintf(stderr, "corrupt input [%s]\n",
