historic_bruno Posted December 11, 2010 Report Share Posted December 11, 2010 Some warnings from a clean build in VS2008. They may be nothing to worry about but I'm going to post them here anyway because they: 1. annoy me, 2. may be useful in the future if bugs are found, or 3. may remind us of things that need to be done.LINK : warning LNK4199: /DELAYLOAD:zlib1.dll ignored; no imports found from zlib1.dllc:\devel\0ad\ps\source\ps\KeyName.h(37) : warning C4067: unexpected tokens following preprocessor directive - expected a newline..\..\..\source\ps\Hotkey.cpp(181) : warning C4067: unexpected tokens following preprocessor directive - expected a newline..\..\..\source\simulation2\components\CCmpObstructionManager.cpp(748) : warning C4100: 'r' : unreferenced formal parameter..\..\..\source\lib\sysdep\os\win\wprintf.cpp(110) : warning C4265: 'FormatString' : class has virtual functions, but destructor is not virtual instances of this class may not be destructed correctly..\..\..\source\lib\sysdep\os\win\wdll_delay_load.cpp(463) : warning C4946: reinterpret_cast used between related classes: 'UnloadInfo' and 'ULI' ..\..\..\source\lib\sysdep\os\win\wdll_delay_load.cpp(181) : see declaration of 'UnloadInfo' ..\..\..\source\lib\sysdep\os\win\wdll_delay_load.cpp(201) : see declaration of 'ULI'vfs_path.obj : warning LNK4221: no public symbols found; archive member will be inaccessible..\..\..\source\network\NetSession.cpp(143) : warning C4062: enumerator 'ENET_EVENT_TYPE_NONE' in switch of enum 'ENetEventType' is not handled c:\devel\0ad\ps\libraries\enet\include\enet/enet.h(322) : see declaration of 'ENetEventType'..\..\..\source\network\NetServer.cpp(335) : warning C4062: enumerator 'ENET_EVENT_TYPE_NONE' in switch of enum 'ENetEventType' is not handled c:\devel\0ad\ps\libraries\enet\include\enet/enet.h(322) : see declaration of 'ENetEventType'The last two can probably be fixed with a default case, which I think is a pretty good practice in general. Also I've fixed some warnings in other files that I haven't committed yet. Quote Link to comment Share on other sites More sharing options...
Ykkrosh Posted December 11, 2010 Report Share Posted December 11, 2010 Fixed some.CCmpObstructionManager.cpp(748) : warning C4100: 'r' : unreferenced formal parameterThat warning is intentionally kept, to remind me that there's missing functionality in that function Quote Link to comment Share on other sites More sharing options...
janwas Posted December 11, 2010 Report Share Posted December 11, 2010 Thanks for paying attention to these warnings!I think it's a general sign of shoddy quality when you compile other code and see TONS of warnings. We've generally been pretty clean, and that makes the remaining warnings stick out (as they should).What remains are warnings about wdll_delay_load and the archive-member-inaccessible thing.As with Philip, I think it is useful to keep these because they should eventually be fixed The delay-loader stuff is from sample code that is pretty crappy and should be overhauled or removed (since most of its raison d'etre is now gone).Fixing the archive-member-inaccessible things would have a slight cost of its own: if those source files are removed and we end up needing to move something from .h into .cpp or just add them, that would require another svn add+rebuild workspace. I think it is easier to do that once as soon as a new header is added, and just tolerate those warnings.It's probably good to leave them enabled, though, because if the source file isn't empty, it is good to know (e.g. os_cpu - that's telling us that the automatic error name association thing is broken due to MSVC's library linking scheme. it used to work before we had separate static libs).I'm not seeing the delay-load warning in VC2010. Can you confirm that the linker command line includes /DELAYLOAD:zlib1.dll and that you were compiling in Release mode? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.