PDA

View Full Version : Small change to debug.h


Ibix
01-20-2006, 06:19 AM
This would be absolutely fabulous, if the development team wouldn't mind including this change in the next possible cvs. Basically, if you're compiling/building using a new (VC++.NET 2005 Express) Windows C++ environment, you get some several thousand warnings about deprecated functions, because Microsoft has rewritten some of the functions being used, such as strcpy.

The following code change just sets the compiler to not display all those painful messages that make locating the real errors more difficult:

Index: common/debug.h
================================================== =================
RCS file: /cvsroot/eqemulator/EQEmuCVS/Source/common/debug.h,v
retrieving revision 1.5.4.5
diff -u -r1.5.4.5 debug.h
--- common/debug.h 8 Jan 2006 21:02:37 -0000 1.5.4.5
+++ common/debug.h 20 Jan 2006 18:09:06 -0000
@@ -86,6 +86,7 @@
#ifdef WIN32
#include <windows.h>
#include <winsock2.h>
+ #pragma warning( disable : 4996 )
#endif

#include "logsys.h"
================================================== =================


Hope that helps someone; I know it was just a minor annoyance, but it's just one line and makes things so much more pretty. If debug.h is not where it belongs, feel free to put it somewhere else, but it's gotta be something included by all the projects.

fireclav
06-18-2006, 10:12 AM
so i take it that warning or w/e is ok and doesnt effect the outcome cuz i get that a lot when i compile

fathernitwit
06-19-2006, 12:25 PM
that statement is already included on line 70 of debug.h, are you of the oppinion that having it later in the file makes a difference?