From 043e32478924689aed232423e4f3dd0fa6bcba9a Mon Sep 17 00:00:00 2001 From: Soren Jorvang Date: Sat, 29 Jan 2011 22:48:33 +0000 Subject: [PATCH] A few compiler warnings. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6975 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/Common/Src/DynamicLibrary.cpp | 7 ++----- Source/Core/VideoCommon/Src/DLCache.cpp | 2 +- Source/Core/VideoCommon/Src/VertexShaderManager.cpp | 2 +- Source/Plugins/Plugin_VideoOGL/Src/FramebufferManager.cpp | 2 +- Source/Plugins/Plugin_VideoOGL/Src/PostProcessing.cpp | 2 +- Source/Plugins/Plugin_VideoOGL/Src/TextureConverter.cpp | 2 +- 6 files changed, 7 insertions(+), 10 deletions(-) diff --git a/Source/Core/Common/Src/DynamicLibrary.cpp b/Source/Core/Common/Src/DynamicLibrary.cpp index 98cce2f2b6..9ffdd04925 100644 --- a/Source/Core/Common/Src/DynamicLibrary.cpp +++ b/Source/Core/Common/Src/DynamicLibrary.cpp @@ -81,8 +81,7 @@ int DynamicLibrary::Load(const char* filename) // RTLD_LOCAL: don't resolve symbols for other libraries library = dlopen(filename, RTLD_NOW | RTLD_LOCAL); #else - library = RTLD_SELF; - return 1; + library = dlopen(NULL, RTLD_LAZY); #endif DEBUG_LOG(COMMON, "DL: LoadLibrary: %s(%p)", filename, library); @@ -120,10 +119,8 @@ int DynamicLibrary::Unload() library_file.c_str(), library); #ifdef _WIN32 retval = FreeLibrary(library); -#elif defined __linux__ - retval = dlclose(library) ? 0 : 1; #else - return 1; + retval = dlclose(library) ? 0 : 1; #endif if (! retval) { diff --git a/Source/Core/VideoCommon/Src/DLCache.cpp b/Source/Core/VideoCommon/Src/DLCache.cpp index 35a3ab0ddd..9128cebb8c 100644 --- a/Source/Core/VideoCommon/Src/DLCache.cpp +++ b/Source/Core/VideoCommon/Src/DLCache.cpp @@ -186,7 +186,7 @@ struct CachedDisplayList { if(Current->hash) { - if(Current->ReferencedArray != -1 && (cached_arraybases[Current->ReferencedArray] != Current->start_address || arraystrides[Current->ReferencedArray] != Current->ReferencedArrayStride)) + if(cached_arraybases[Current->ReferencedArray] != Current->start_address || arraystrides[Current->ReferencedArray] != Current->ReferencedArrayStride) { return false; } diff --git a/Source/Core/VideoCommon/Src/VertexShaderManager.cpp b/Source/Core/VideoCommon/Src/VertexShaderManager.cpp index d344258e9e..87485ab462 100644 --- a/Source/Core/VideoCommon/Src/VertexShaderManager.cpp +++ b/Source/Core/VideoCommon/Src/VertexShaderManager.cpp @@ -92,7 +92,7 @@ void UpdateProjectionHack(int iPhackvalue[], std::string sPhackvalue[]) float fhackvalue1 = 0, fhackvalue2 = 0; float fhacksign1 = 1.0, fhacksign2 = 1.0; bool bProjHack3 = false; - char *sTemp[2]; + const char *sTemp[2]; if (iPhackvalue[0] == 0) goto hackDisabled; diff --git a/Source/Plugins/Plugin_VideoOGL/Src/FramebufferManager.cpp b/Source/Plugins/Plugin_VideoOGL/Src/FramebufferManager.cpp index 2a6457f224..233b01bfa3 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/FramebufferManager.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/FramebufferManager.cpp @@ -407,4 +407,4 @@ void FramebufferManager::GetTargetSize(unsigned int *width, unsigned int *height *height = m_targetHeight; } -} // namespace OGL \ No newline at end of file +} // namespace OGL diff --git a/Source/Plugins/Plugin_VideoOGL/Src/PostProcessing.cpp b/Source/Plugins/Plugin_VideoOGL/Src/PostProcessing.cpp index 2eb553a551..86b0f12ec9 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/PostProcessing.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/PostProcessing.cpp @@ -89,4 +89,4 @@ bool ApplyShader() } // namespace -} // namespace OGL \ No newline at end of file +} // namespace OGL diff --git a/Source/Plugins/Plugin_VideoOGL/Src/TextureConverter.cpp b/Source/Plugins/Plugin_VideoOGL/Src/TextureConverter.cpp index 2bf9371cde..1442df28f8 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/TextureConverter.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/TextureConverter.cpp @@ -473,4 +473,4 @@ void DecodeToTexture(u32 xfbAddr, int srcWidth, int srcHeight, GLuint destTextur } // namespace -} // namespace OGL \ No newline at end of file +} // namespace OGL