diff options
author | Timothy Gu <timothygu99@gmail.com> | 2015-03-15 17:32:10 -0700 |
---|---|---|
committer | Timothy Gu <timothygu99@gmail.com> | 2015-03-15 17:33:10 -0700 |
commit | c5501073ab629de3c5491258bf040462b873a85a (patch) | |
tree | 55a1a192225ef1830ac5f0a06aca36be01096927 | |
parent | 50f42865af91e83e0b0d9341a839deed359b1070 (diff) | |
download | dlfcn-win32-c5501073ab629de3c5491258bf040462b873a85a.tar.gz dlfcn-win32-c5501073ab629de3c5491258bf040462b873a85a.tar.bz2 dlfcn-win32-c5501073ab629de3c5491258bf040462b873a85a.zip |
Warning control in MSVC
-rw-r--r-- | dlfcn.c | 5 | ||||
-rw-r--r-- | visual-studio/12/dl/dl.vcxproj | 6 |
2 files changed, 8 insertions, 3 deletions
@@ -373,6 +373,10 @@ end: | |||
373 | if( symbol == NULL ) | 373 | if( symbol == NULL ) |
374 | save_err_str( name ); | 374 | save_err_str( name ); |
375 | 375 | ||
376 | // warning C4054: 'type cast' : from function pointer 'FARPROC' to data pointer 'void *' | ||
377 | #ifdef _MSC_VER | ||
378 | #pragma warning( suppress: 4054 ) | ||
379 | #endif | ||
376 | return (void*) symbol; | 380 | return (void*) symbol; |
377 | } | 381 | } |
378 | 382 | ||
@@ -391,6 +395,7 @@ char *dlerror( void ) | |||
391 | #ifdef SHARED | 395 | #ifdef SHARED |
392 | BOOL WINAPI DllMain( HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved ) | 396 | BOOL WINAPI DllMain( HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved ) |
393 | { | 397 | { |
398 | (void) hinstDLL; | ||
394 | /* | 399 | /* |
395 | * https://msdn.microsoft.com/en-us/library/windows/desktop/ms682583(v=vs.85).aspx | 400 | * https://msdn.microsoft.com/en-us/library/windows/desktop/ms682583(v=vs.85).aspx |
396 | * | 401 | * |
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 @@ | |||
147 | <WarningLevel>Level4</WarningLevel> | 147 | <WarningLevel>Level4</WarningLevel> |
148 | <Optimization>Disabled</Optimization> | 148 | <Optimization>Disabled</Optimization> |
149 | <SDLCheck>true</SDLCheck> | 149 | <SDLCheck>true</SDLCheck> |
150 | <PreprocessorDefinitions>SHARED;%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
150 | </ClCompile> | 151 | </ClCompile> |
151 | <Link> | 152 | <Link> |
152 | <GenerateDebugInformation>true</GenerateDebugInformation> | 153 | <GenerateDebugInformation>true</GenerateDebugInformation> |
@@ -158,7 +159,6 @@ | |||
158 | <WarningLevel>Level4</WarningLevel> | 159 | <WarningLevel>Level4</WarningLevel> |
159 | <Optimization>Disabled</Optimization> | 160 | <Optimization>Disabled</Optimization> |
160 | <SDLCheck>true</SDLCheck> | 161 | <SDLCheck>true</SDLCheck> |
161 | <PreprocessorDefinitions>SHARED;%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
162 | </ClCompile> | 162 | </ClCompile> |
163 | <Link> | 163 | <Link> |
164 | <GenerateDebugInformation>true</GenerateDebugInformation> | 164 | <GenerateDebugInformation>true</GenerateDebugInformation> |
@@ -171,6 +171,7 @@ | |||
171 | <FunctionLevelLinking>true</FunctionLevelLinking> | 171 | <FunctionLevelLinking>true</FunctionLevelLinking> |
172 | <IntrinsicFunctions>true</IntrinsicFunctions> | 172 | <IntrinsicFunctions>true</IntrinsicFunctions> |
173 | <SDLCheck>true</SDLCheck> | 173 | <SDLCheck>true</SDLCheck> |
174 | <PreprocessorDefinitions>SHARED;%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
174 | </ClCompile> | 175 | </ClCompile> |
175 | <Link> | 176 | <Link> |
176 | <GenerateDebugInformation>true</GenerateDebugInformation> | 177 | <GenerateDebugInformation>true</GenerateDebugInformation> |
@@ -216,7 +217,6 @@ | |||
216 | <FunctionLevelLinking>true</FunctionLevelLinking> | 217 | <FunctionLevelLinking>true</FunctionLevelLinking> |
217 | <IntrinsicFunctions>true</IntrinsicFunctions> | 218 | <IntrinsicFunctions>true</IntrinsicFunctions> |
218 | <SDLCheck>true</SDLCheck> | 219 | <SDLCheck>true</SDLCheck> |
219 | <PreprocessorDefinitions>SHARED;%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
220 | </ClCompile> | 220 | </ClCompile> |
221 | <Link> | 221 | <Link> |
222 | <GenerateDebugInformation>true</GenerateDebugInformation> | 222 | <GenerateDebugInformation>true</GenerateDebugInformation> |
@@ -233,4 +233,4 @@ | |||
233 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> | 233 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> |
234 | <ImportGroup Label="ExtensionTargets"> | 234 | <ImportGroup Label="ExtensionTargets"> |
235 | </ImportGroup> | 235 | </ImportGroup> |
236 | </Project> \ No newline at end of file | 236 | </Project> |