You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
1. compile sample2.cc with Visual Studio 2005
Output from compiler is:
cc(52) : warning C4996: 'strcpy' was declared deprecated
c:\program files\microsoft visual studio 8\vc\include\string.h(73) : see declaration of 'strcpy'
Message: 'This function or variable may be unsafe. Consider using strcpy_s instead. To disable
deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
I don't want to have to #define _CRT_SECURE_NO_DEPRECATE
Original issue reported on code.google.com by keith....@gmail.com on 6 Oct 2008 at 6:22
Attachments:
The text was updated successfully, but these errors were encountered:
my suggested fix is one line: change strcpy, that MSVS is complaining about,
to memcpy.
old:
strcpy(clone, c_string);
new:
memcpy(clone, c_string, len + 1);
patch file is attached.
Original comment by keith....@gmail.com on 6 Oct 2008 at 6:43
Keith,
I am putting the change in, together with another sample fix (that one for VS
7.1).
They may take a week or two to filter to svn, though -- we are busy with the
other
things right now.
Original comment by vladlosev on 9 Oct 2008 at 1:02
Original issue reported on code.google.com by
keith....@gmail.com
on 6 Oct 2008 at 6:22Attachments:
The text was updated successfully, but these errors were encountered: