Skip to content

Conversation

@gojimmypi
Copy link
Contributor

Addressed Windows compile warnings, plus some auto-formatted issues:

C:\workspace\wolfBoot-gojimmypi\src\delta.c(184,23): warning G3FF16C77: 'getenv' is deprecated: This function or variable may be unsafe. Consider using _dupenv_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [-Wdeprecated-declarations]
    184 |     env_sector_size = getenv("WOLFBOOT_SECTOR_SIZE");
        |                       ^
  C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt\stdlib.h:1183:20: note: 'getenv' has been explicitly marked deprecated here
   1183 |     _Check_return_ _CRT_INSECURE_DEPRECATE(_dupenv_s)
        |                    ^
  C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.44.35207\include\vcruntime.h:368:55: note: expanded from macro '_CRT_INSECURE_DEPRECATE'
    368 |         #define _CRT_INSECURE_DEPRECATE(_Replacement) _CRT_DEPRECATE_TEXT(    \
        |                                                       ^
  C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.44.35207\include\vcruntime.h:358:47: note: expanded from macro '_CRT_DEPRECATE_TEXT'
  
    358 | #define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))
  
        |                                               ^
  
  1 warning generated.

C:\workspace\wolfBoot-gojimmypi\tools\bin-assemble\bin-assemble.c(114,21): warning G2F2FF7DD: '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]
    114 |                     strerror(errno));
        |                     ^
  C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt\string.h:177:16: note: 'strerror' has been explicitly marked deprecated here
    177 | _Check_return_ _CRT_INSECURE_DEPRECATE(strerror_s)
        |                ^
  C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.44.35207\include\vcruntime.h:368:55: note: expanded from macro '_CRT_INSECURE_DEPRECATE'
    368 |         #define _CRT_INSECURE_DEPRECATE(_Replacement) _CRT_DEPRECATE_TEXT(    \
        |                                                       ^
  C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.44.35207\include\vcruntime.h:358:47: note: expanded from macro '_CRT_DEPRECATE_TEXT'
    358 | #define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))
        |                                               ^
C:\workspace\wolfBoot-gojimmypi\tools\bin-assemble\bin-assemble.c(148,16): warning G5F7974A8: '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]
    148 |     FILE* fo = fopen(outname, "wb");
        |                ^
  C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt\stdio.h:212:20: note: 'fopen' has been explicitly marked deprecated here
    212 |     _Check_return_ _CRT_INSECURE_DEPRECATE(fopen_s)
        |                    ^
  C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.44.35207\include\vcruntime.h:368:55: note: expanded from macro '_CRT_INSECURE_DEPRECATE'
    368 |         #define _CRT_INSECURE_DEPRECATE(_Replacement) _CRT_DEPRECATE_TEXT(    \
        |                                                       ^
  C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.44.35207\include\vcruntime.h:358:47: note: expanded from macro '_CRT_DEPRECATE_TEXT'
    358 | #define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))
        |                                               ^
C:\workspace\wolfBoot-gojimmypi\tools\bin-assemble\bin-assemble.c(151,26): warning G2F2FF7DD: '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]
    151 |                 outname, strerror(errno));
        |                          ^
  C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt\string.h:177:16: note: 'strerror' has been explicitly marked deprecated here
    177 | _Check_return_ _CRT_INSECURE_DEPRECATE(strerror_s)
        |                ^
  C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.44.35207\include\vcruntime.h:368:55: note: expanded from macro '_CRT_INSECURE_DEPRECATE'
    368 |         #define _CRT_INSECURE_DEPRECATE(_Replacement) _CRT_DEPRECATE_TEXT(    \
        |                                                       ^
  C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.44.35207\include\vcruntime.h:358:47: note: expanded from macro '_CRT_DEPRECATE_TEXT'
    358 | #define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))
        |                                               ^
C:\workspace\wolfBoot-gojimmypi\tools\bin-assemble\bin-assemble.c(158,20): warning G5F7974A8: '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]
    158 |         FILE* fi = fopen(entries[i].fname, "rb");
        |                    ^
  C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt\stdio.h:212:20: note: 'fopen' has been explicitly marked deprecated here
    212 |     _Check_return_ _CRT_INSECURE_DEPRECATE(fopen_s)
        |                    ^
  C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.44.35207\include\vcruntime.h:368:55: note: expanded from macro '_CRT_INSECURE_DEPRECATE'
    368 |         #define _CRT_INSECURE_DEPRECATE(_Replacement) _CRT_DEPRECATE_TEXT(    \
        |                                                       ^
  C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.44.35207\include\vcruntime.h:358:47: note: expanded from macro '_CRT_DEPRECATE_TEXT'
    358 | #define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))
        |                                               ^
C:\workspace\wolfBoot-gojimmypi\tools\bin-assemble\bin-assemble.c(161,39): warning G2F2FF7DD: '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]
    161 |                     entries[i].fname, strerror(errno));
        |                                       ^
  C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\ucrt\string.h:177:16: note: 'strerror' has been explicitly marked deprecated here
    177 | _Check_return_ _CRT_INSECURE_DEPRECATE(strerror_s)
        |                ^
  C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.44.35207\include\vcruntime.h:368:55: note: expanded from macro '_CRT_INSECURE_DEPRECATE'
  
    368 |         #define _CRT_INSECURE_DEPRECATE(_Replacement) _CRT_DEPRECATE_TEXT(    \
  
        |                                                       ^
  
  C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.44.35207\include\vcruntime.h:358:47: note: expanded from macro '_CRT_DEPRECATE_TEXT'
  
    358 | #define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))
  
        |                                               ^
  
  5 warnings generated.

@dgarske dgarske assigned gojimmypi and unassigned gojimmypi and wolfSSL-Bot Oct 21, 2025
@dgarske dgarske requested review from danielinux and removed request for wolfSSL-Bot October 21, 2025 16:40
@dgarske dgarske assigned danielinux and wolfSSL-Bot and unassigned gojimmypi Oct 21, 2025
@danielinux danielinux merged commit 74857d0 into wolfSSL:master Oct 22, 2025
266 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants