Fixed issue when linking with C++/CLI application

The Microsoft Visual C++ compiler, or specifically linker, generates an error about a possible uninitialized pointer when linking if `output` is left uninitialized. This fixes that issue.
This commit is contained in:
John Leidegren 2015-11-11 20:08:08 +01:00
parent a08855c715
commit 635b3dc1f9

View File

@ -629,7 +629,7 @@ int BrotliCompressWithCustomDictionary(size_t dictsize, const uint8_t* dict,
BrotliIn* in, BrotliOut* out) { BrotliIn* in, BrotliOut* out) {
size_t in_bytes = 0; size_t in_bytes = 0;
size_t out_bytes = 0; size_t out_bytes = 0;
uint8_t* output; uint8_t* output = NULL;
bool final_block = false; bool final_block = false;
BrotliCompressor compressor(params); BrotliCompressor compressor(params);
if (dictsize != 0) compressor.BrotliSetCustomDictionary(dictsize, dict); if (dictsize != 0) compressor.BrotliSetCustomDictionary(dictsize, dict);