Skip to content
Commit 8796c17e authored by scottmg@chromium.org's avatar scottmg@chromium.org
Browse files

gn win: Fix potentially uninitialized variable warning in zip_internal

The gn Windows build says

d:\src\cr3\src\third_party\zlib\google\zip_internal.cc(62) : error C2220: warning treated as error - no 'object' file generated
d:\src\cr3\src\third_party\zlib\google\zip_internal.cc(62) : warning C4701: potentially uninitialized local variable 'creation_disposition' used

This warning is disabled in the gyp build, but it seems better to keep
it on if possible, and it seems like depending on the flags passed to
ZipOpenFunc, it could indeed be passing an uninitialized value to
::CreateFile. Setting it explicitly to 0 will cause ::CreateFile to
fail, if it's left unset by the ifs.

R=satorux@chromium.org
BUG=354261

Review URL: https://codereview.chromium.org/430963002

Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 167c929e90ac048545bdf16cf454c03b3bae2882
parent 00024291
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment