Remove _CRT_SECURE_NO_WARNINGS #774
No reviewers
Labels
No labels
3rdparty
Android
API
Author does not respond
bsd
bug
build system/CI
ci-virtual-device
CMake
Contributions Welcome
Core
dependencies
device-specific
documentation
don't_merge
duplicate
enhancement
Example
Haiku
hidraw
hotplug
info required
invalid
libusb
macOS
Misc
Not an issue
question
Release
Test
Test GUI
Windows
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-libusb/hidapi!774
Loading…
Reference in a new issue
No description provided.
Delete branch "dev-remove-crt-secure"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes: #770
Pull request overview
This PR removes reliance on
_CRT_SECURE_NO_WARNINGSin the Windows backend by switching to MSVC “secure CRT” function variants where appropriate, addressing MSVC warning noise reported in #770.Changes:
_CRT_SECURE_NO_WARNINGSdefines from Windows source/header files.swprintf_s/wcsncpy_sinwindows/hid.c.sscanf_s(with required buffer-size args) when building with MSVC.Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
sscanf_son MSVC (and passes scanset buffer sizes) to avoid CRT “unsafe” warnings._CRT_SECURE_NO_WARNINGSdefine block._CRT_SECURE_NO_WARNINGSand uses MSVC secure CRT wrappers forswprintf/wcsncpy.💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.