madler / zlib

A massively spiffy yet delicately unobtrusive compression library.
http://zlib.net/
Other
5.46k stars 2.41k forks source link

Code improvement for iowin32.c #956

Closed Lwisce closed 3 months ago

Lwisce commented 3 months ago

I found that in the iowin32.c, there are some function parameters and declared variables that are not used. This will generate warnings in the MSVC compiler. Can we consider using (void) for unused function parameters and directly deleting unused variables to avoid warnings? Here is example:

voidpf ZCALLBACK win32_open64_file_func(voidpf opaque, const void filename, int mode) { - const char mode_fopen = NULL; + (void)opaque; DWORD dwDesiredAccess,dwCreationDisposition,dwShareMode,dwFlagsAndAttributes ; HANDLE hFile = NULL;

madler commented 3 months ago

Ok. Warnings averted.