diff --git a/src/compressor/snappy/SnappyCompressor.h b/src/compressor/snappy/SnappyCompressor.h
index 25393f8dc1ff4..93206c4007bed 100644
--- a/src/compressor/snappy/SnappyCompressor.h
+++ b/src/compressor/snappy/SnappyCompressor.h
@@ -97,8 +97,8 @@ class SnappyCompressor : public Compressor {
     if (qat_enabled)
       return qat_accel.decompress(p, compressed_len, dst, compressor_message);
 #endif
-    snappy::uint32 res_len = 0;
     BufferlistSource source_1(p, compressed_len);
+    uint32_t res_len = 0;
     if (!snappy::GetUncompressedLength(&source_1, &res_len)) {
       return -1;
     }
