Visual Studio 2022 C17 Compiler unsafe sprintf error C4996
adotspooner opened this issue · comments
Arthur Spooner commented
Hi :) I get the following error with my project settings in Visual Studio 2022 with the C17 Compiler.
I would like to let this security warning feature enabled, maybe cglm could upgrade to the secure versions of the print functions?
Error C4996 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead.
To disable deprecation, use _CRT_SECURE_NO_WARNINGS.
cglm-0.9.4\include\cglm\io.h 135
Recep Aslantas commented
Hi @adotspooner,
Thanks for reporting this, eb3a51e should do the job. IIRC, sprintf_s
is not standard below C11 so snprintf()
is enough for now, I think.
Arthur Spooner commented
Hi @recp,
thank you for this ultra fast response, I will build cglm with this commit tomorrow and try it with my VS project.
Arthur Spooner commented
Recep Aslantas commented
@adotspooner great to hear that!
Thanks