From c5501073ab629de3c5491258bf040462b873a85a Mon Sep 17 00:00:00 2001 From: Timothy Gu Date: Sun, 15 Mar 2015 17:32:10 -0700 Subject: Warning control in MSVC --- dlfcn.c | 5 +++++ visual-studio/12/dl/dl.vcxproj | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/dlfcn.c b/dlfcn.c index b1877bd..d6c4356 100644 --- a/dlfcn.c +++ b/dlfcn.c @@ -373,6 +373,10 @@ end: if( symbol == NULL ) save_err_str( name ); +// warning C4054: 'type cast' : from function pointer 'FARPROC' to data pointer 'void *' +#ifdef _MSC_VER +#pragma warning( suppress: 4054 ) +#endif return (void*) symbol; } @@ -391,6 +395,7 @@ char *dlerror( void ) #ifdef SHARED BOOL WINAPI DllMain( HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved ) { + (void) hinstDLL; /* * https://msdn.microsoft.com/en-us/library/windows/desktop/ms682583(v=vs.85).aspx * diff --git a/visual-studio/12/dl/dl.vcxproj b/visual-studio/12/dl/dl.vcxproj index 45f87e7..77c7cdb 100644 --- a/visual-studio/12/dl/dl.vcxproj +++ b/visual-studio/12/dl/dl.vcxproj @@ -147,6 +147,7 @@ Level4 Disabled true + SHARED;%(PreprocessorDefinitions) true @@ -158,7 +159,6 @@ Level4 Disabled true - SHARED;%(PreprocessorDefinitions) true @@ -171,6 +171,7 @@ true true true + SHARED;%(PreprocessorDefinitions) true @@ -216,7 +217,6 @@ true true true - SHARED;%(PreprocessorDefinitions) true @@ -233,4 +233,4 @@ - \ No newline at end of file + -- cgit v1.2.3-55-g6feb