2 Warnings C4047 and C4024 in MSVC #770

Closed
opened 2026-01-30 14:43:30 -06:00 by BravoBaldo · 2 comments
BravoBaldo commented 2026-01-30 14:43:30 -06:00 (Migrated from github.com)

Windows, MSVC:
2 Warnings 284:
warning C4047:
warning C4024:

Solution:
replace swprintf with swprintf_s.

Windows, MSVC: 2 Warnings 284: warning C4047: warning C4024: **Solution:** replace `swprintf` with `swprintf_s`.
Youw commented 2026-01-31 11:51:22 -06:00 (Migrated from github.com)

Can you attach full compiler output? So it includes specific lines and command-line arguments, since our current CI does treat warnings as errors, and this one isn't caught by CI.

Are you using CMake of HIDAPI? What are the cmake arguments?

Can you attach full compiler output? So it includes specific lines and command-line arguments, since our current CI does treat warnings as errors, and this one isn't caught by CI. Are you using CMake of HIDAPI? What are the cmake arguments?
BravoBaldo commented 2026-01-31 13:20:43 -06:00 (Migrated from github.com)

Sorry, in my haste I forgot to finish the post:
The file to be "fixed" is "hid.c"
I have a simple command-line program compiled with Visual Studio Version 17.14.25 + the minimal WxWidgets command-line program:
(the messages are in italian!)

Image
Sorry, in my haste I forgot to finish the post: The file to be "fixed" is "hid.c" I have a simple command-line program compiled with Visual Studio Version 17.14.25 + the minimal WxWidgets command-line program: (the messages are in italian!) <img width="1501" height="921" alt="Image" src="https://github.com/user-attachments/assets/80c439ab-1cde-4afa-aa1a-3f6b744aaf5e" />
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-libusb/hidapi#770
No description provided.