Skip to content

Compiler warnings when building on Windows with clang + cmake #932

@pmqs

Description

@pmqs

Not sure if this is intended to be a supported combination, but a Windows build using clang & cmake spits out plenty of Compiler warnings

D:\Linux\develop\zlib>cmake -B build -S . -DCMAKE_C_COMPILER="clang" -G Ninja
-- The C compiler identification is Clang 16.0.5 with GNU-like command-line
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/Tools/Llvm/bin/clang.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of off64_t
-- Check size of off64_t - failed
-- Looking for fseeko
-- Looking for fseeko - not found
-- Looking for unistd.h
-- Looking for unistd.h - not found
-- Configuring done (3.7s)
-- Generating done (0.1s)
-- Build files have been written to: D:/Linux/develop/zlib/build

D:\Linux\develop\zlib>cmake --build build
[1/37] Building C object CMakeFiles/zlib.dir/compress.c.obj
[2/37] Building C object CMakeFiles/zlib.dir/adler32.c.obj
[3/37] Building C object CMakeFiles/zlib.dir/crc32.c.obj
[4/37] Building C object CMakeFiles/zlib.dir/gzread.c.obj
D:/Linux/develop/zlib/gzread.c:22:15: warning: 'read' is deprecated: The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _read. See online help for details. [-Wdeprecated-declarations]
        ret = read(state->fd, buf + *have, get);
              ^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\corecrt_io.h:524:9: note: 'read' has been explicitly marked deprecated here
        _CRT_NONSTDC_DEPRECATE(_read)
        ^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\corecrt.h:428:50: note: expanded from macro '_CRT_NONSTDC_DEPRECATE'
        #define _CRT_NONSTDC_DEPRECATE(_NewName) _CRT_DEPRECATE_TEXT(             \
                                                 ^
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\include\vcruntime.h:345:47: note: expanded from macro '_CRT_DEPRECATE_TEXT'
#define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))
                                              ^
D:/Linux/develop/zlib/gzread.c:28:34: warning: 'strerror' is deprecated: This function or variable may be unsafe. Consider using strerror_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [-Wdeprecated-declarations]
        gz_error(state, Z_ERRNO, zstrerror());
                                 ^
D:/Linux/develop/zlib/gzguts.h:127:25: note: expanded from macro 'zstrerror'
#    define zstrerror() strerror(errno)
                        ^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\string.h:177:16: note: 'strerror' has been explicitly marked deprecated here
_Check_return_ _CRT_INSECURE_DEPRECATE(strerror_s)
               ^
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\include\vcruntime.h:355:55: note: expanded from macro '_CRT_INSECURE_DEPRECATE'
        #define _CRT_INSECURE_DEPRECATE(_Replacement) _CRT_DEPRECATE_TEXT(    \
                                                      ^
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\include\vcruntime.h:345:47: note: expanded from macro '_CRT_DEPRECATE_TEXT'
#define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))
                                              ^
D:/Linux/develop/zlib/gzread.c:599:11: warning: 'close' is deprecated: The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _close. See online help for details. [-Wdeprecated-declarations]
    ret = close(state->fd);
          ^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\corecrt_io.h:460:28: note: 'close' has been explicitly marked deprecated here
        _Check_return_opt_ _CRT_NONSTDC_DEPRECATE(_close)
                           ^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\corecrt.h:428:50: note: expanded from macro '_CRT_NONSTDC_DEPRECATE'
        #define _CRT_NONSTDC_DEPRECATE(_NewName) _CRT_DEPRECATE_TEXT(             \
                                                 ^
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\include\vcruntime.h:345:47: note: expanded from macro '_CRT_DEPRECATE_TEXT'
#define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))
                                              ^
3 warnings generated.
[5/37] Building C object CMakeFiles/zlib.dir/gzclose.c.obj
[6/37] Building C object CMakeFiles/zlib.dir/gzwrite.c.obj
D:/Linux/develop/zlib/gzwrite.c:78:20: warning: 'write' is deprecated: The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _write. See online help for details. [-Wdeprecated-declarations]
            writ = write(state->fd, strm->next_in, put);
                   ^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\corecrt_io.h:559:24: note: 'write' has been explicitly marked deprecated here
        _Check_return_ _CRT_NONSTDC_DEPRECATE(_write)
                       ^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\corecrt.h:428:50: note: expanded from macro '_CRT_NONSTDC_DEPRECATE'
        #define _CRT_NONSTDC_DEPRECATE(_NewName) _CRT_DEPRECATE_TEXT(             \
                                                 ^
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\include\vcruntime.h:345:47: note: expanded from macro '_CRT_DEPRECATE_TEXT'
#define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))
                                              ^
D:/Linux/develop/zlib/gzwrite.c:80:42: warning: 'strerror' is deprecated: This function or variable may be unsafe. Consider using strerror_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [-Wdeprecated-declarations]
                gz_error(state, Z_ERRNO, zstrerror());
                                         ^
D:/Linux/develop/zlib/gzguts.h:127:25: note: expanded from macro 'zstrerror'
#    define zstrerror() strerror(errno)
                        ^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\string.h:177:16: note: 'strerror' has been explicitly marked deprecated here
_Check_return_ _CRT_INSECURE_DEPRECATE(strerror_s)
               ^
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\include\vcruntime.h:355:55: note: expanded from macro '_CRT_INSECURE_DEPRECATE'
        #define _CRT_INSECURE_DEPRECATE(_Replacement) _CRT_DEPRECATE_TEXT(    \
                                                      ^
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\include\vcruntime.h:345:47: note: expanded from macro '_CRT_DEPRECATE_TEXT'
#define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))
                                              ^
D:/Linux/develop/zlib/gzwrite.c:108:24: warning: 'write' is deprecated: The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _write. See online help for details. [-Wdeprecated-declarations]
                writ = write(state->fd, state->x.next, put);
                       ^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\corecrt_io.h:559:24: note: 'write' has been explicitly marked deprecated here
        _Check_return_ _CRT_NONSTDC_DEPRECATE(_write)
                       ^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\corecrt.h:428:50: note: expanded from macro '_CRT_NONSTDC_DEPRECATE'
        #define _CRT_NONSTDC_DEPRECATE(_NewName) _CRT_DEPRECATE_TEXT(             \
                                                 ^
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\include\vcruntime.h:345:47: note: expanded from macro '_CRT_DEPRECATE_TEXT'
#define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))
                                              ^
D:/Linux/develop/zlib/gzwrite.c:110:46: warning: 'strerror' is deprecated: This function or variable may be unsafe. Consider using strerror_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [-Wdeprecated-declarations]
                    gz_error(state, Z_ERRNO, zstrerror());
                                             ^
D:/Linux/develop/zlib/gzguts.h:127:25: note: expanded from macro 'zstrerror'
#    define zstrerror() strerror(errno)
                        ^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\string.h:177:16: note: 'strerror' has been explicitly marked deprecated here
_Check_return_ _CRT_INSECURE_DEPRECATE(strerror_s)
               ^
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\include\vcruntime.h:355:55: note: expanded from macro '_CRT_INSECURE_DEPRECATE'
        #define _CRT_INSECURE_DEPRECATE(_Replacement) _CRT_DEPRECATE_TEXT(    \
                                                      ^
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\include\vcruntime.h:345:47: note: expanded from macro '_CRT_DEPRECATE_TEXT'
#define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))
                                              ^
D:/Linux/develop/zlib/gzwrite.c:627:9: warning: 'close' is deprecated: The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _close. See online help for details. [-Wdeprecated-declarations]
    if (close(state->fd) == -1)
        ^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\corecrt_io.h:460:28: note: 'close' has been explicitly marked deprecated here
        _Check_return_opt_ _CRT_NONSTDC_DEPRECATE(_close)
                           ^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\corecrt.h:428:50: note: expanded from macro '_CRT_NONSTDC_DEPRECATE'
        #define _CRT_NONSTDC_DEPRECATE(_NewName) _CRT_DEPRECATE_TEXT(             \
                                                 ^
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\include\vcruntime.h:345:47: note: expanded from macro '_CRT_DEPRECATE_TEXT'
#define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))
                                              ^
5 warnings generated.
[7/37] Building C object CMakeFiles/zlib.dir/deflate.c.obj
[8/37] Building C object CMakeFiles/zlib.dir/inflate.c.obj
[9/37] Building C object CMakeFiles/zlib.dir/infback.c.obj
[10/37] Building C object CMakeFiles/zlib.dir/inftrees.c.obj
[11/37] Building C object CMakeFiles/zlib.dir/inffast.c.obj
[12/37] Building C object CMakeFiles/zlib.dir/uncompr.c.obj
[13/37] Building C object CMakeFiles/zlib.dir/gzlib.c.obj
D:/Linux/develop/zlib/gzlib.c:183:15: warning: 'wcstombs' is deprecated: This function or variable may be unsafe. Consider using wcstombs_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [-Wdeprecated-declarations]
        len = wcstombs(NULL, path, 0);
              ^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\stdlib.h:1012:1: note: 'wcstombs' has been explicitly marked deprecated here
__DEFINE_CPP_OVERLOAD_STANDARD_NFUNC_0_2_SIZE(
^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\corecrt.h:891:5: note: expanded from macro '__DEFINE_CPP_OVERLOAD_STANDARD_NFUNC_0_2_SIZE'
    __DEFINE_CPP_OVERLOAD_STANDARD_NFUNC_0_2_SIZE_EX(_DeclSpec, _FuncName, _FuncName##_s, _DstType, _SalAttributeDst, _DstType, _Dst, _TType1, _TArg1, _TType2, _TArg2)
    ^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\corecrt.h:1962:17: note: expanded from macro '__DEFINE_CPP_OVERLOAD_STANDARD_NFUNC_0_2_SIZE_EX'
                _CRT_INSECURE_DEPRECATE(_SecureFuncName) _DeclSpec size_t __cdecl _FuncName(_SalAttributeDst _DstType *_Dst, _TType1 _TArg1, _TType2 _TArg2);
                ^
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\include\vcruntime.h:355:55: note: expanded from macro '_CRT_INSECURE_DEPRECATE'
        #define _CRT_INSECURE_DEPRECATE(_Replacement) _CRT_DEPRECATE_TEXT(    \
                                                      ^
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\include\vcruntime.h:345:47: note: expanded from macro '_CRT_DEPRECATE_TEXT'
#define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))
                                              ^
D:/Linux/develop/zlib/gzlib.c:198:13: warning: 'wcstombs' is deprecated: This function or variable may be unsafe. Consider using wcstombs_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [-Wdeprecated-declarations]
            wcstombs(state->path, path, len + 1);
            ^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\stdlib.h:1012:1: note: 'wcstombs' has been explicitly marked deprecated here
__DEFINE_CPP_OVERLOAD_STANDARD_NFUNC_0_2_SIZE(
^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\corecrt.h:891:5: note: expanded from macro '__DEFINE_CPP_OVERLOAD_STANDARD_NFUNC_0_2_SIZE'
    __DEFINE_CPP_OVERLOAD_STANDARD_NFUNC_0_2_SIZE_EX(_DeclSpec, _FuncName, _FuncName##_s, _DstType, _SalAttributeDst, _DstType, _Dst, _TType1, _TArg1, _TType2, _TArg2)
    ^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\corecrt.h:1962:17: note: expanded from macro '__DEFINE_CPP_OVERLOAD_STANDARD_NFUNC_0_2_SIZE_EX'
                _CRT_INSECURE_DEPRECATE(_SecureFuncName) _DeclSpec size_t __cdecl _FuncName(_SalAttributeDst _DstType *_Dst, _TType1 _TArg1, _TType2 _TArg2);
                ^
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\include\vcruntime.h:355:55: note: expanded from macro '_CRT_INSECURE_DEPRECATE'
        #define _CRT_INSECURE_DEPRECATE(_Replacement) _CRT_DEPRECATE_TEXT(    \
                                                      ^
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\include\vcruntime.h:345:47: note: expanded from macro '_CRT_DEPRECATE_TEXT'
#define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))
                                              ^
D:/Linux/develop/zlib/gzlib.c:233:20: warning: '_wopen' is deprecated: This function or variable may be unsafe. Consider using _wsopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [-Wdeprecated-declarations]
        fd == -2 ? _wopen(path, oflag, 0666) :
                   ^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\corecrt_wio.h:253:20: note: '_wopen' has been explicitly marked deprecated here
    _Check_return_ _CRT_INSECURE_DEPRECATE(_wsopen_s)
                   ^
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\include\vcruntime.h:355:55: note: expanded from macro '_CRT_INSECURE_DEPRECATE'
        #define _CRT_INSECURE_DEPRECATE(_Replacement) _CRT_DEPRECATE_TEXT(    \
                                                      ^
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\include\vcruntime.h:345:47: note: expanded from macro '_CRT_DEPRECATE_TEXT'
#define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))
                                              ^
D:/Linux/develop/zlib/gzlib.c:235:9: warning: 'open' is deprecated: The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _open. See online help for details. [-Wdeprecated-declarations]
        open((const char *)path, oflag, 0666));
        ^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\corecrt_io.h:517:24: note: 'open' has been explicitly marked deprecated here
        _Check_return_ _CRT_NONSTDC_DEPRECATE(_open) _CRT_INSECURE_DEPRECATE(_sopen_s)
                       ^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\corecrt.h:428:50: note: expanded from macro '_CRT_NONSTDC_DEPRECATE'
        #define _CRT_NONSTDC_DEPRECATE(_NewName) _CRT_DEPRECATE_TEXT(             \
                                                 ^
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\include\vcruntime.h:345:47: note: expanded from macro '_CRT_DEPRECATE_TEXT'
#define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))
                                              ^
4 warnings generated.
[14/37] Building RC object CMakeFiles/zlib.dir/win32/zlib1.rc.res
Microsoft (R) Windows (R) Resource Compiler Version 10.0.10011.16384
Copyright (C) Microsoft Corporation.  All rights reserved.

[15/37] Building C object CMakeFiles/zlib.dir/trees.c.obj
[16/37] Building C object CMakeFiles/zlibstatic.dir/compress.c.obj
[17/37] Building C object CMakeFiles/zlibstatic.dir/adler32.c.obj
[18/37] Building C object CMakeFiles/zlib.dir/zutil.c.obj
[19/37] Building C object CMakeFiles/zlibstatic.dir/crc32.c.obj
[20/37] Building C object CMakeFiles/zlibstatic.dir/gzclose.c.obj
[21/37] Building C object CMakeFiles/zlibstatic.dir/deflate.c.obj
[22/37] Building C object CMakeFiles/zlibstatic.dir/gzread.c.obj
D:/Linux/develop/zlib/gzread.c:22:15: warning: 'read' is deprecated: The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _read. See online help for details. [-Wdeprecated-declarations]
        ret = read(state->fd, buf + *have, get);
              ^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\corecrt_io.h:524:9: note: 'read' has been explicitly marked deprecated here
        _CRT_NONSTDC_DEPRECATE(_read)
        ^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\corecrt.h:428:50: note: expanded from macro '_CRT_NONSTDC_DEPRECATE'
        #define _CRT_NONSTDC_DEPRECATE(_NewName) _CRT_DEPRECATE_TEXT(             \
                                                 ^
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\include\vcruntime.h:345:47: note: expanded from macro '_CRT_DEPRECATE_TEXT'
#define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))
                                              ^
D:/Linux/develop/zlib/gzread.c:28:34: warning: 'strerror' is deprecated: This function or variable may be unsafe. Consider using strerror_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [-Wdeprecated-declarations]
        gz_error(state, Z_ERRNO, zstrerror());
                                 ^
D:/Linux/develop/zlib/gzguts.h:127:25: note: expanded from macro 'zstrerror'
#    define zstrerror() strerror(errno)
                        ^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\string.h:177:16: note: 'strerror' has been explicitly marked deprecated here
_Check_return_ _CRT_INSECURE_DEPRECATE(strerror_s)
               ^
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\include\vcruntime.h:355:55: note: expanded from macro '_CRT_INSECURE_DEPRECATE'
        #define _CRT_INSECURE_DEPRECATE(_Replacement) _CRT_DEPRECATE_TEXT(    \
                                                      ^
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\include\vcruntime.h:345:47: note: expanded from macro '_CRT_DEPRECATE_TEXT'
#define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))
                                              ^
D:/Linux/develop/zlib/gzread.c:599:11: warning: 'close' is deprecated: The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _close. See online help for details. [-Wdeprecated-declarations]
    ret = close(state->fd);
          ^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\corecrt_io.h:460:28: note: 'close' has been explicitly marked deprecated here
        _Check_return_opt_ _CRT_NONSTDC_DEPRECATE(_close)
                           ^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\corecrt.h:428:50: note: expanded from macro '_CRT_NONSTDC_DEPRECATE'
        #define _CRT_NONSTDC_DEPRECATE(_NewName) _CRT_DEPRECATE_TEXT(             \
                                                 ^
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\include\vcruntime.h:345:47: note: expanded from macro '_CRT_DEPRECATE_TEXT'
#define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))
                                              ^
3 warnings generated.
[23/37] Building C object CMakeFiles/zlibstatic.dir/infback.c.obj
[24/37] Building C object CMakeFiles/zlibstatic.dir/inftrees.c.obj
[25/37] Building C object CMakeFiles/zlibstatic.dir/inflate.c.obj
[26/37] Building C object CMakeFiles/zlibstatic.dir/gzwrite.c.obj
D:/Linux/develop/zlib/gzwrite.c:78:20: warning: 'write' is deprecated: The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _write. See online help for details. [-Wdeprecated-declarations]
            writ = write(state->fd, strm->next_in, put);
                   ^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\corecrt_io.h:559:24: note: 'write' has been explicitly marked deprecated here
        _Check_return_ _CRT_NONSTDC_DEPRECATE(_write)
                       ^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\corecrt.h:428:50: note: expanded from macro '_CRT_NONSTDC_DEPRECATE'
        #define _CRT_NONSTDC_DEPRECATE(_NewName) _CRT_DEPRECATE_TEXT(             \
                                                 ^
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\include\vcruntime.h:345:47: note: expanded from macro '_CRT_DEPRECATE_TEXT'
#define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))
                                              ^
D:/Linux/develop/zlib/gzwrite.c:80:42: warning: 'strerror' is deprecated: This function or variable may be unsafe. Consider using strerror_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [-Wdeprecated-declarations]
                gz_error(state, Z_ERRNO, zstrerror());
                                         ^
D:/Linux/develop/zlib/gzguts.h:127:25: note: expanded from macro 'zstrerror'
#    define zstrerror() strerror(errno)
                        ^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\string.h:177:16: note: 'strerror' has been explicitly marked deprecated here
_Check_return_ _CRT_INSECURE_DEPRECATE(strerror_s)
               ^
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\include\vcruntime.h:355:55: note: expanded from macro '_CRT_INSECURE_DEPRECATE'
        #define _CRT_INSECURE_DEPRECATE(_Replacement) _CRT_DEPRECATE_TEXT(    \
                                                      ^
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\include\vcruntime.h:345:47: note: expanded from macro '_CRT_DEPRECATE_TEXT'
#define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))
                                              ^
D:/Linux/develop/zlib/gzwrite.c:108:24: warning: 'write' is deprecated: The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _write. See online help for details. [-Wdeprecated-declarations]
                writ = write(state->fd, state->x.next, put);
                       ^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\corecrt_io.h:559:24: note: 'write' has been explicitly marked deprecated here
        _Check_return_ _CRT_NONSTDC_DEPRECATE(_write)
                       ^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\corecrt.h:428:50: note: expanded from macro '_CRT_NONSTDC_DEPRECATE'
        #define _CRT_NONSTDC_DEPRECATE(_NewName) _CRT_DEPRECATE_TEXT(             \
                                                 ^
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\include\vcruntime.h:345:47: note: expanded from macro '_CRT_DEPRECATE_TEXT'
#define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))
                                              ^
D:/Linux/develop/zlib/gzwrite.c:110:46: warning: 'strerror' is deprecated: This function or variable may be unsafe. Consider using strerror_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [-Wdeprecated-declarations]
                    gz_error(state, Z_ERRNO, zstrerror());
                                             ^
D:/Linux/develop/zlib/gzguts.h:127:25: note: expanded from macro 'zstrerror'
#    define zstrerror() strerror(errno)
                        ^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\string.h:177:16: note: 'strerror' has been explicitly marked deprecated here
_Check_return_ _CRT_INSECURE_DEPRECATE(strerror_s)
               ^
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\include\vcruntime.h:355:55: note: expanded from macro '_CRT_INSECURE_DEPRECATE'
        #define _CRT_INSECURE_DEPRECATE(_Replacement) _CRT_DEPRECATE_TEXT(    \
                                                      ^
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\include\vcruntime.h:345:47: note: expanded from macro '_CRT_DEPRECATE_TEXT'
#define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))
                                              ^
D:/Linux/develop/zlib/gzwrite.c:627:9: warning: 'close' is deprecated: The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _close. See online help for details. [-Wdeprecated-declarations]
    if (close(state->fd) == -1)
        ^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\corecrt_io.h:460:28: note: 'close' has been explicitly marked deprecated here
        _Check_return_opt_ _CRT_NONSTDC_DEPRECATE(_close)
                           ^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\corecrt.h:428:50: note: expanded from macro '_CRT_NONSTDC_DEPRECATE'
        #define _CRT_NONSTDC_DEPRECATE(_NewName) _CRT_DEPRECATE_TEXT(             \
                                                 ^
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\include\vcruntime.h:345:47: note: expanded from macro '_CRT_DEPRECATE_TEXT'
#define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))
                                              ^
5 warnings generated.
[27/37] Building C object CMakeFiles/zlibstatic.dir/gzlib.c.obj
D:/Linux/develop/zlib/gzlib.c:183:15: warning: 'wcstombs' is deprecated: This function or variable may be unsafe. Consider using wcstombs_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [-Wdeprecated-declarations]
        len = wcstombs(NULL, path, 0);
              ^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\stdlib.h:1012:1: note: 'wcstombs' has been explicitly marked deprecated here
__DEFINE_CPP_OVERLOAD_STANDARD_NFUNC_0_2_SIZE(
^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\corecrt.h:891:5: note: expanded from macro '__DEFINE_CPP_OVERLOAD_STANDARD_NFUNC_0_2_SIZE'
    __DEFINE_CPP_OVERLOAD_STANDARD_NFUNC_0_2_SIZE_EX(_DeclSpec, _FuncName, _FuncName##_s, _DstType, _SalAttributeDst, _DstType, _Dst, _TType1, _TArg1, _TType2, _TArg2)
    ^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\corecrt.h:1962:17: note: expanded from macro '__DEFINE_CPP_OVERLOAD_STANDARD_NFUNC_0_2_SIZE_EX'
                _CRT_INSECURE_DEPRECATE(_SecureFuncName) _DeclSpec size_t __cdecl _FuncName(_SalAttributeDst _DstType *_Dst, _TType1 _TArg1, _TType2 _TArg2);
                ^
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\include\vcruntime.h:355:55: note: expanded from macro '_CRT_INSECURE_DEPRECATE'
        #define _CRT_INSECURE_DEPRECATE(_Replacement) _CRT_DEPRECATE_TEXT(    \
                                                      ^
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\include\vcruntime.h:345:47: note: expanded from macro '_CRT_DEPRECATE_TEXT'
#define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))
                                              ^
D:/Linux/develop/zlib/gzlib.c:198:13: warning: 'wcstombs' is deprecated: This function or variable may be unsafe. Consider using wcstombs_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [-Wdeprecated-declarations]
            wcstombs(state->path, path, len + 1);
            ^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\stdlib.h:1012:1: note: 'wcstombs' has been explicitly marked deprecated here
__DEFINE_CPP_OVERLOAD_STANDARD_NFUNC_0_2_SIZE(
^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\corecrt.h:891:5: note: expanded from macro '__DEFINE_CPP_OVERLOAD_STANDARD_NFUNC_0_2_SIZE'
    __DEFINE_CPP_OVERLOAD_STANDARD_NFUNC_0_2_SIZE_EX(_DeclSpec, _FuncName, _FuncName##_s, _DstType, _SalAttributeDst, _DstType, _Dst, _TType1, _TArg1, _TType2, _TArg2)
    ^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\corecrt.h:1962:17: note: expanded from macro '__DEFINE_CPP_OVERLOAD_STANDARD_NFUNC_0_2_SIZE_EX'
                _CRT_INSECURE_DEPRECATE(_SecureFuncName) _DeclSpec size_t __cdecl _FuncName(_SalAttributeDst _DstType *_Dst, _TType1 _TArg1, _TType2 _TArg2);
                ^
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\include\vcruntime.h:355:55: note: expanded from macro '_CRT_INSECURE_DEPRECATE'
        #define _CRT_INSECURE_DEPRECATE(_Replacement) _CRT_DEPRECATE_TEXT(    \
                                                      ^
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\include\vcruntime.h:345:47: note: expanded from macro '_CRT_DEPRECATE_TEXT'
#define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))
                                              ^
D:/Linux/develop/zlib/gzlib.c:233:20: warning: '_wopen' is deprecated: This function or variable may be unsafe. Consider using _wsopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [-Wdeprecated-declarations]
        fd == -2 ? _wopen(path, oflag, 0666) :
                   ^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\corecrt_wio.h:253:20: note: '_wopen' has been explicitly marked deprecated here
    _Check_return_ _CRT_INSECURE_DEPRECATE(_wsopen_s)
                   ^
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\include\vcruntime.h:355:55: note: expanded from macro '_CRT_INSECURE_DEPRECATE'
        #define _CRT_INSECURE_DEPRECATE(_Replacement) _CRT_DEPRECATE_TEXT(    \
                                                      ^
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\include\vcruntime.h:345:47: note: expanded from macro '_CRT_DEPRECATE_TEXT'
#define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))
                                              ^
D:/Linux/develop/zlib/gzlib.c:235:9: warning: 'open' is deprecated: The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _open. See online help for details. [-Wdeprecated-declarations]
        open((const char *)path, oflag, 0666));
        ^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\corecrt_io.h:517:24: note: 'open' has been explicitly marked deprecated here
        _Check_return_ _CRT_NONSTDC_DEPRECATE(_open) _CRT_INSECURE_DEPRECATE(_sopen_s)
                       ^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\corecrt.h:428:50: note: expanded from macro '_CRT_NONSTDC_DEPRECATE'
        #define _CRT_NONSTDC_DEPRECATE(_NewName) _CRT_DEPRECATE_TEXT(             \
                                                 ^
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\include\vcruntime.h:345:47: note: expanded from macro '_CRT_DEPRECATE_TEXT'
#define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))
                                              ^
4 warnings generated.
[28/37] Building C object CMakeFiles/zlibstatic.dir/inffast.c.obj
[29/37] Building C object CMakeFiles/zlibstatic.dir/uncompr.c.obj
[30/37] Building C object CMakeFiles/zlibstatic.dir/trees.c.obj
[31/37] Building C object CMakeFiles/zlibstatic.dir/zutil.c.obj
[32/37] Building C object CMakeFiles/example.dir/test/example.c.obj
D:/Linux/develop/zlib/test/example.c:70:5: warning: 'strcpy' is deprecated: This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [-Wdeprecated-declarations]
    strcpy((char*)uncompr, "garbage");
    ^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\string.h:130:1: note: 'strcpy' has been explicitly marked deprecated here
__DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_1(
^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\corecrt.h:835:5: note: expanded from macro '__DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_1'
    __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_1_EX(_ReturnType, _ReturnPolicy, _DeclSpec, _FuncName, _FuncName##_s, _DstType, _SalAttributeDst, _DstType, _Dst, _TType1, _TArg1)
    ^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\corecrt.h:1894:17: note: expanded from macro '__DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_1_EX'
                _CRT_INSECURE_DEPRECATE(_SecureFuncName) _DeclSpec _ReturnType __cdecl _FuncName(_SalAttributeDst _DstType *_Dst, _TType1 _TArg1);
                ^
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\include\vcruntime.h:355:55: note: expanded from macro '_CRT_INSECURE_DEPRECATE'
        #define _CRT_INSECURE_DEPRECATE(_Replacement) _CRT_DEPRECATE_TEXT(    \
                                                      ^
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\include\vcruntime.h:345:47: note: expanded from macro '_CRT_DEPRECATE_TEXT'
#define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))
                                              ^
D:/Linux/develop/zlib/test/example.c:117:5: warning: 'strcpy' is deprecated: This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [-Wdeprecated-declarations]
    strcpy((char*)uncompr, "garbage");
    ^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\string.h:130:1: note: 'strcpy' has been explicitly marked deprecated here
__DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_1(
^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\corecrt.h:835:5: note: expanded from macro '__DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_1'
    __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_1_EX(_ReturnType, _ReturnPolicy, _DeclSpec, _FuncName, _FuncName##_s, _DstType, _SalAttributeDst, _DstType, _Dst, _TType1, _TArg1)
    ^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\corecrt.h:1894:17: note: expanded from macro '__DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_1_EX'
                _CRT_INSECURE_DEPRECATE(_SecureFuncName) _DeclSpec _ReturnType __cdecl _FuncName(_SalAttributeDst _DstType *_Dst, _TType1 _TArg1);
                ^
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\include\vcruntime.h:355:55: note: expanded from macro '_CRT_INSECURE_DEPRECATE'
        #define _CRT_INSECURE_DEPRECATE(_Replacement) _CRT_DEPRECATE_TEXT(    \
                                                      ^
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\include\vcruntime.h:345:47: note: expanded from macro '_CRT_DEPRECATE_TEXT'
#define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))
                                              ^
D:/Linux/develop/zlib/test/example.c:208:5: warning: 'strcpy' is deprecated: This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [-Wdeprecated-declarations]
    strcpy((char*)uncompr, "garbage");
    ^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\string.h:130:1: note: 'strcpy' has been explicitly marked deprecated here
__DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_1(
^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\corecrt.h:835:5: note: expanded from macro '__DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_1'
    __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_1_EX(_ReturnType, _ReturnPolicy, _DeclSpec, _FuncName, _FuncName##_s, _DstType, _SalAttributeDst, _DstType, _Dst, _TType1, _TArg1)
    ^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\corecrt.h:1894:17: note: expanded from macro '__DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_1_EX'
                _CRT_INSECURE_DEPRECATE(_SecureFuncName) _DeclSpec _ReturnType __cdecl _FuncName(_SalAttributeDst _DstType *_Dst, _TType1 _TArg1);
                ^
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\include\vcruntime.h:355:55: note: expanded from macro '_CRT_INSECURE_DEPRECATE'
        #define _CRT_INSECURE_DEPRECATE(_Replacement) _CRT_DEPRECATE_TEXT(    \
                                                      ^
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\include\vcruntime.h:345:47: note: expanded from macro '_CRT_DEPRECATE_TEXT'
#define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))
                                              ^
D:/Linux/develop/zlib/test/example.c:300:5: warning: 'strcpy' is deprecated: This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [-Wdeprecated-declarations]
    strcpy((char*)uncompr, "garbage");
    ^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\string.h:130:1: note: 'strcpy' has been explicitly marked deprecated here
__DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_1(
^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\corecrt.h:835:5: note: expanded from macro '__DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_1'
    __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_1_EX(_ReturnType, _ReturnPolicy, _DeclSpec, _FuncName, _FuncName##_s, _DstType, _SalAttributeDst, _DstType, _Dst, _TType1, _TArg1)
    ^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\corecrt.h:1894:17: note: expanded from macro '__DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_1_EX'
                _CRT_INSECURE_DEPRECATE(_SecureFuncName) _DeclSpec _ReturnType __cdecl _FuncName(_SalAttributeDst _DstType *_Dst, _TType1 _TArg1);
                ^
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\include\vcruntime.h:355:55: note: expanded from macro '_CRT_INSECURE_DEPRECATE'
        #define _CRT_INSECURE_DEPRECATE(_Replacement) _CRT_DEPRECATE_TEXT(    \
                                                      ^
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\include\vcruntime.h:345:47: note: expanded from macro '_CRT_DEPRECATE_TEXT'
#define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))
                                              ^
D:/Linux/develop/zlib/test/example.c:374:5: warning: 'strcpy' is deprecated: This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [-Wdeprecated-declarations]
    strcpy((char*)uncompr, "garbage");
    ^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\string.h:130:1: note: 'strcpy' has been explicitly marked deprecated here
__DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_1(
^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\corecrt.h:835:5: note: expanded from macro '__DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_1'
    __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_1_EX(_ReturnType, _ReturnPolicy, _DeclSpec, _FuncName, _FuncName##_s, _DstType, _SalAttributeDst, _DstType, _Dst, _TType1, _TArg1)
    ^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\corecrt.h:1894:17: note: expanded from macro '__DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_1_EX'
                _CRT_INSECURE_DEPRECATE(_SecureFuncName) _DeclSpec _ReturnType __cdecl _FuncName(_SalAttributeDst _DstType *_Dst, _TType1 _TArg1);
                ^
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\include\vcruntime.h:355:55: note: expanded from macro '_CRT_INSECURE_DEPRECATE'
        #define _CRT_INSECURE_DEPRECATE(_Replacement) _CRT_DEPRECATE_TEXT(    \
                                                      ^
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\include\vcruntime.h:345:47: note: expanded from macro '_CRT_DEPRECATE_TEXT'
#define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))
                                              ^
D:/Linux/develop/zlib/test/example.c:449:5: warning: 'strcpy' is deprecated: This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [-Wdeprecated-declarations]
    strcpy((char*)uncompr, "garbage");
    ^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\string.h:130:1: note: 'strcpy' has been explicitly marked deprecated here
__DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_1(
^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\corecrt.h:835:5: note: expanded from macro '__DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_1'
    __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_1_EX(_ReturnType, _ReturnPolicy, _DeclSpec, _FuncName, _FuncName##_s, _DstType, _SalAttributeDst, _DstType, _Dst, _TType1, _TArg1)
    ^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\corecrt.h:1894:17: note: expanded from macro '__DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_1_EX'
                _CRT_INSECURE_DEPRECATE(_SecureFuncName) _DeclSpec _ReturnType __cdecl _FuncName(_SalAttributeDst _DstType *_Dst, _TType1 _TArg1);
                ^
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\include\vcruntime.h:355:55: note: expanded from macro '_CRT_INSECURE_DEPRECATE'
        #define _CRT_INSECURE_DEPRECATE(_Replacement) _CRT_DEPRECATE_TEXT(    \
                                                      ^
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\include\vcruntime.h:345:47: note: expanded from macro '_CRT_DEPRECATE_TEXT'
#define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))
                                              ^
6 warnings generated.
[33/37] Building C object CMakeFiles/minigzip.dir/test/minigzip.c.obj
D:/Linux/develop/zlib/test/minigzip.c:427:10: warning: 'fopen' is deprecated: This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [-Wdeprecated-declarations]
    in = fopen(file, "rb");
         ^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\stdio.h:212:20: note: 'fopen' has been explicitly marked deprecated here
    _Check_return_ _CRT_INSECURE_DEPRECATE(fopen_s)
                   ^
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\include\vcruntime.h:355:55: note: expanded from macro '_CRT_INSECURE_DEPRECATE'
        #define _CRT_INSECURE_DEPRECATE(_Replacement) _CRT_DEPRECATE_TEXT(    \
                                                      ^
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\include\vcruntime.h:345:47: note: expanded from macro '_CRT_DEPRECATE_TEXT'
#define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))
                                              ^
D:/Linux/develop/zlib/test/minigzip.c:439:5: warning: 'unlink' is deprecated: The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _unlink. See online help for details. [-Wdeprecated-declarations]
    unlink(file);
    ^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\corecrt_io.h:554:9: note: 'unlink' has been explicitly marked deprecated here
        _CRT_NONSTDC_DEPRECATE(_unlink)
        ^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\corecrt.h:428:50: note: expanded from macro '_CRT_NONSTDC_DEPRECATE'
        #define _CRT_NONSTDC_DEPRECATE(_NewName) _CRT_DEPRECATE_TEXT(             \
                                                 ^
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\include\vcruntime.h:345:47: note: expanded from macro '_CRT_DEPRECATE_TEXT'
#define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))
                                              ^
D:/Linux/develop/zlib/test/minigzip.c:474:11: warning: 'fopen' is deprecated: This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [-Wdeprecated-declarations]
    out = fopen(outfile, "wb");
          ^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\stdio.h:212:20: note: 'fopen' has been explicitly marked deprecated here
    _Check_return_ _CRT_INSECURE_DEPRECATE(fopen_s)
                   ^
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\include\vcruntime.h:355:55: note: expanded from macro '_CRT_INSECURE_DEPRECATE'
        #define _CRT_INSECURE_DEPRECATE(_Replacement) _CRT_DEPRECATE_TEXT(    \
                                                      ^
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\include\vcruntime.h:345:47: note: expanded from macro '_CRT_DEPRECATE_TEXT'
#define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))
                                              ^
D:/Linux/develop/zlib/test/minigzip.c:482:5: warning: 'unlink' is deprecated: The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _unlink. See online help for details. [-Wdeprecated-declarations]
    unlink(infile);
    ^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\corecrt_io.h:554:9: note: 'unlink' has been explicitly marked deprecated here
        _CRT_NONSTDC_DEPRECATE(_unlink)
        ^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\corecrt.h:428:50: note: expanded from macro '_CRT_NONSTDC_DEPRECATE'
        #define _CRT_NONSTDC_DEPRECATE(_NewName) _CRT_DEPRECATE_TEXT(             \
                                                 ^
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\include\vcruntime.h:345:47: note: expanded from macro '_CRT_DEPRECATE_TEXT'
#define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))
                                              ^
D:/Linux/develop/zlib/test/minigzip.c:537:9: warning: 'setmode' is deprecated: The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _setmode. See online help for details. [-Wdeprecated-declarations]
        SET_BINARY_MODE(stdin);
        ^
D:/Linux/develop/zlib/test/minigzip.c:42:33: note: expanded from macro 'SET_BINARY_MODE'
#  define SET_BINARY_MODE(file) setmode(fileno(file), O_BINARY)
                                ^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\corecrt_io.h:531:24: note: 'setmode' has been explicitly marked deprecated here
        _Check_return_ _CRT_NONSTDC_DEPRECATE(_setmode)
                       ^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\corecrt.h:428:50: note: expanded from macro '_CRT_NONSTDC_DEPRECATE'
        #define _CRT_NONSTDC_DEPRECATE(_NewName) _CRT_DEPRECATE_TEXT(             \
                                                 ^
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\include\vcruntime.h:345:47: note: expanded from macro '_CRT_DEPRECATE_TEXT'
#define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))
                                              ^
D:/Linux/develop/zlib/test/minigzip.c:537:9: warning: 'fileno' is deprecated: The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _fileno. See online help for details. [-Wdeprecated-declarations]
        SET_BINARY_MODE(stdin);
        ^
D:/Linux/develop/zlib/test/minigzip.c:42:41: note: expanded from macro 'SET_BINARY_MODE'
#  define SET_BINARY_MODE(file) setmode(fileno(file), O_BINARY)
                                        ^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\stdio.h:2433:28: note: 'fileno' has been explicitly marked deprecated here
        _Check_return_     _CRT_NONSTDC_DEPRECATE(_fileno)    _ACRTIMP int   __cdecl fileno(_In_ FILE* _Stream);
                           ^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\corecrt.h:428:50: note: expanded from macro '_CRT_NONSTDC_DEPRECATE'
        #define _CRT_NONSTDC_DEPRECATE(_NewName) _CRT_DEPRECATE_TEXT(             \
                                                 ^
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\include\vcruntime.h:345:47: note: expanded from macro '_CRT_DEPRECATE_TEXT'
#define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))
                                              ^
D:/Linux/develop/zlib/test/minigzip.c:538:9: warning: 'setmode' is deprecated: The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _setmode. See online help for details. [-Wdeprecated-declarations]
        SET_BINARY_MODE(stdout);
        ^
D:/Linux/develop/zlib/test/minigzip.c:42:33: note: expanded from macro 'SET_BINARY_MODE'
#  define SET_BINARY_MODE(file) setmode(fileno(file), O_BINARY)
                                ^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\corecrt_io.h:531:24: note: 'setmode' has been explicitly marked deprecated here
        _Check_return_ _CRT_NONSTDC_DEPRECATE(_setmode)
                       ^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\corecrt.h:428:50: note: expanded from macro '_CRT_NONSTDC_DEPRECATE'
        #define _CRT_NONSTDC_DEPRECATE(_NewName) _CRT_DEPRECATE_TEXT(             \
                                                 ^
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\include\vcruntime.h:345:47: note: expanded from macro '_CRT_DEPRECATE_TEXT'
#define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))
                                              ^
D:/Linux/develop/zlib/test/minigzip.c:538:9: warning: 'fileno' is deprecated: The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _fileno. See online help for details. [-Wdeprecated-declarations]
        SET_BINARY_MODE(stdout);
        ^
D:/Linux/develop/zlib/test/minigzip.c:42:41: note: expanded from macro 'SET_BINARY_MODE'
#  define SET_BINARY_MODE(file) setmode(fileno(file), O_BINARY)
                                        ^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\stdio.h:2433:28: note: 'fileno' has been explicitly marked deprecated here
        _Check_return_     _CRT_NONSTDC_DEPRECATE(_fileno)    _ACRTIMP int   __cdecl fileno(_In_ FILE* _Stream);
                           ^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\corecrt.h:428:50: note: expanded from macro '_CRT_NONSTDC_DEPRECATE'
        #define _CRT_NONSTDC_DEPRECATE(_NewName) _CRT_DEPRECATE_TEXT(             \
                                                 ^
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\include\vcruntime.h:345:47: note: expanded from macro '_CRT_DEPRECATE_TEXT'
#define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))
                                              ^
D:/Linux/develop/zlib/test/minigzip.c:540:28: warning: 'fileno' is deprecated: The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _fileno. See online help for details. [-Wdeprecated-declarations]
            file = gzdopen(fileno(stdin), "rb");
                           ^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\stdio.h:2433:28: note: 'fileno' has been explicitly marked deprecated here
        _Check_return_     _CRT_NONSTDC_DEPRECATE(_fileno)    _ACRTIMP int   __cdecl fileno(_In_ FILE* _Stream);
                           ^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\corecrt.h:428:50: note: expanded from macro '_CRT_NONSTDC_DEPRECATE'
        #define _CRT_NONSTDC_DEPRECATE(_NewName) _CRT_DEPRECATE_TEXT(             \
                                                 ^
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\include\vcruntime.h:345:47: note: expanded from macro '_CRT_DEPRECATE_TEXT'
#define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))
                                              ^
D:/Linux/develop/zlib/test/minigzip.c:544:28: warning: 'fileno' is deprecated: The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _fileno. See online help for details. [-Wdeprecated-declarations]
            file = gzdopen(fileno(stdout), outmode);
                           ^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\stdio.h:2433:28: note: 'fileno' has been explicitly marked deprecated here
        _Check_return_     _CRT_NONSTDC_DEPRECATE(_fileno)    _ACRTIMP int   __cdecl fileno(_In_ FILE* _Stream);
                           ^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\corecrt.h:428:50: note: expanded from macro '_CRT_NONSTDC_DEPRECATE'
        #define _CRT_NONSTDC_DEPRECATE(_NewName) _CRT_DEPRECATE_TEXT(             \
                                                 ^
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\include\vcruntime.h:345:47: note: expanded from macro '_CRT_DEPRECATE_TEXT'
#define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))
                                              ^
D:/Linux/develop/zlib/test/minigzip.c:550:13: warning: 'setmode' is deprecated: The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _setmode. See online help for details. [-Wdeprecated-declarations]
            SET_BINARY_MODE(stdout);
            ^
D:/Linux/develop/zlib/test/minigzip.c:42:33: note: expanded from macro 'SET_BINARY_MODE'
#  define SET_BINARY_MODE(file) setmode(fileno(file), O_BINARY)
                                ^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\corecrt_io.h:531:24: note: 'setmode' has been explicitly marked deprecated here
        _Check_return_ _CRT_NONSTDC_DEPRECATE(_setmode)
                       ^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\corecrt.h:428:50: note: expanded from macro '_CRT_NONSTDC_DEPRECATE'
        #define _CRT_NONSTDC_DEPRECATE(_NewName) _CRT_DEPRECATE_TEXT(             \
                                                 ^
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\include\vcruntime.h:345:47: note: expanded from macro '_CRT_DEPRECATE_TEXT'
#define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))
                                              ^
D:/Linux/develop/zlib/test/minigzip.c:550:13: warning: 'fileno' is deprecated: The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _fileno. See online help for details. [-Wdeprecated-declarations]
            SET_BINARY_MODE(stdout);
            ^
D:/Linux/develop/zlib/test/minigzip.c:42:41: note: expanded from macro 'SET_BINARY_MODE'
#  define SET_BINARY_MODE(file) setmode(fileno(file), O_BINARY)
                                        ^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\stdio.h:2433:28: note: 'fileno' has been explicitly marked deprecated here
        _Check_return_     _CRT_NONSTDC_DEPRECATE(_fileno)    _ACRTIMP int   __cdecl fileno(_In_ FILE* _Stream);
                           ^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\corecrt.h:428:50: note: expanded from macro '_CRT_NONSTDC_DEPRECATE'
        #define _CRT_NONSTDC_DEPRECATE(_NewName) _CRT_DEPRECATE_TEXT(             \
                                                 ^
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\include\vcruntime.h:345:47: note: expanded from macro '_CRT_DEPRECATE_TEXT'
#define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))
                                              ^
D:/Linux/develop/zlib/test/minigzip.c:565:33: warning: 'fopen' is deprecated: This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [-Wdeprecated-declarations]
                    FILE * in = fopen(*argv, "rb");
                                ^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\stdio.h:212:20: note: 'fopen' has been explicitly marked deprecated here
    _Check_return_ _CRT_INSECURE_DEPRECATE(fopen_s)
                   ^
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\include\vcruntime.h:355:55: note: expanded from macro '_CRT_INSECURE_DEPRECATE'
        #define _CRT_INSECURE_DEPRECATE(_Replacement) _CRT_DEPRECATE_TEXT(    \
                                                      ^
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\include\vcruntime.h:345:47: note: expanded from macro '_CRT_DEPRECATE_TEXT'
#define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))
                                              ^
D:/Linux/develop/zlib/test/minigzip.c:570:40: warning: 'fileno' is deprecated: The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _fileno. See online help for details. [-Wdeprecated-declarations]
                        file = gzdopen(fileno(stdout), outmode);
                                       ^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\stdio.h:2433:28: note: 'fileno' has been explicitly marked deprecated here
        _Check_return_     _CRT_NONSTDC_DEPRECATE(_fileno)    _ACRTIMP int   __cdecl fileno(_In_ FILE* _Stream);
                           ^
C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt\corecrt.h:428:50: note: expanded from macro '_CRT_NONSTDC_DEPRECATE'
        #define _CRT_NONSTDC_DEPRECATE(_NewName) _CRT_DEPRECATE_TEXT(             \
                                                 ^
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\include\vcruntime.h:345:47: note: expanded from macro '_CRT_DEPRECATE_TEXT'
#define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))
                                              ^
14 warnings generated.
[34/37] Linking C shared library zlib.dll
[35/37] Linking C static library zlibstatic.lib
[36/37] Linking C executable minigzip.exe
[37/37] Linking C executable example.exe

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions