Closed amuuu closed 1 year ago
There is no good solution here.
Both usages in the code base are perfectly fine and safe and it's a false positive on the side of your compiler.
The strncpy_s
and fopen_s
are newer than their counterpart and switching might therefore break other users. I will not potentially break users to suppress false positives for some users.
The strncpy
usage could be "solved" by writing the loop by hand... but that does not really make things better.
I think the easiest way is to selectively suppress the warning using https://learn.microsoft.com/en-us/cpp/preprocessor/warning
Thank you so much 🙏🏽👊🏽
Hello,
I'm trying to integrate the header in my code but it gives me these errors:
I don't want to disable deprecation preferably.
I tried to change the header to use
strncpy_s
andfopen_s
but it gave the error thatstd
doesn't contain those functions. The global namespace has those functions but they have different headers.Any idea how can I make it work?
Thanks in advance.
(Note, I'm using VS2022,17.4.4, C++17)