From 27e1ff761cf0508be28bbb53390b5971067d394f Mon Sep 17 00:00:00 2001 From: elupus Date: Sun, 18 Apr 2010 21:05:41 +0000 Subject: changed: reduce compile time warnings about depreciated functions and non safe functions and other things on windows build git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@29376 568bbfeb-2a22-0410-94d2-cc84cf5bfa90 --- lib/enca/lib/common.c | 1 + lib/enca/lib/encnames.c | 2 ++ lib/enca/lib/filters.c | 1 + lib/enca/lib/guess.c | 1 + lib/enca/lib/lang.c | 2 ++ lib/enca/lib/multibyte.c | 1 + lib/enca/lib/pair.c | 1 + lib/enca/libenca_win32/libenca_win32.vcproj | 4 ++-- lib/fribidi/libfridibidi/libfridibidi.vcproj | 16 ++-------------- lib/libcdio/lib/driver/portable.h | 4 +++- lib/libcdio/lib/paranoia/p_block.h | 5 +++++ lib/libcdio/libcdio.vcproj | 4 ++-- lib/libiconv/libiconv_win32/libiconv_win32.vcproj | 16 ++-------------- lib/pcre/libpcre/libpcre.vcproj | 12 ++++++------ project/VS2008Express/UnrarXLib.vcproj | 3 +-- xbmc/lib/cmyth/Win32/libcmyth.vcproj | 4 +--- xbmc/lib/libRTV/crypt.c | 2 +- xbmc/lib/libRTV/libRTV.vcproj | 10 +++++----- xbmc/lib/libXBMS/ccincludes.h | 2 ++ xbmc/lib/libXBMS/libXBMS/libXBMS.vcproj | 4 ++-- xbmc/lib/libXDAAP/libXDAAP_win32/libXDAAP_win32.vcproj | 4 ++-- xbmc/lib/libass/libass_win32/libass_win32_vs2008.vcproj | 6 +++--- xbmc/lib/libexif/libexif.vcproj | 3 --- xbmc/lib/libmms/libmms_win32/msvc++/libmms.vcproj | 4 ++-- .../libsamplerate_win32/libsamplerate_win32.vcproj | 4 ++-- xbmc/lib/libshout/argv.c | 3 +++ xbmc/lib/libshout/libshout/libshout.vcproj | 6 ++---- xbmc/lib/libshout/list.h | 2 +- xbmc/lib/libsquish/vs7/squish/squish_2008.vcproj | 2 -- .../sqLite/sqlite/libsqlite_win32/libsqlite_win32.vcproj | 2 -- .../DirectXSpectrum/directx_spectrum.vcproj | 6 ++---- xbmc/visualizations/Milkdrop/Plugin.vcproj | 8 ++++---- xbmc/visualizations/WaveForm/Waveform.vcproj | 12 ++++-------- 33 files changed, 68 insertions(+), 89 deletions(-) diff --git a/lib/enca/lib/common.c b/lib/enca/lib/common.c index cd4ec7250f..e2529d0bbf 100644 --- a/lib/enca/lib/common.c +++ b/lib/enca/lib/common.c @@ -22,6 +22,7 @@ #endif /* HAVE_CONFIG_H */ #include +#include #include "enca.h" #include "internal.h" diff --git a/lib/enca/lib/encnames.c b/lib/enca/lib/encnames.c index 1441befce8..6ecb41c9d8 100644 --- a/lib/enca/lib/encnames.c +++ b/lib/enca/lib/encnames.c @@ -21,6 +21,8 @@ # include "config.h" #endif /* HAVE_CONFIG_H */ +#include + #include "enca.h" #include "internal.h" #include "tools/encodings.h" diff --git a/lib/enca/lib/filters.c b/lib/enca/lib/filters.c index bd1b887d51..76bb20c0e0 100644 --- a/lib/enca/lib/filters.c +++ b/lib/enca/lib/filters.c @@ -22,6 +22,7 @@ #endif /* HAVE_CONFIG_H */ #include +#include #include "enca.h" #include "internal.h" diff --git a/lib/enca/lib/guess.c b/lib/enca/lib/guess.c index 822fe39ea3..4330f4896d 100644 --- a/lib/enca/lib/guess.c +++ b/lib/enca/lib/guess.c @@ -22,6 +22,7 @@ #endif /* HAVE_CONFIG_H */ #include +#include #include "enca.h" #include "internal.h" diff --git a/lib/enca/lib/lang.c b/lib/enca/lib/lang.c index 98e27f3493..be89846e34 100644 --- a/lib/enca/lib/lang.c +++ b/lib/enca/lib/lang.c @@ -21,6 +21,8 @@ # include "config.h" #endif /* HAVE_CONFIG_H */ +#include + #include "enca.h" #include "internal.h" diff --git a/lib/enca/lib/multibyte.c b/lib/enca/lib/multibyte.c index d0d0680db4..368f406566 100644 --- a/lib/enca/lib/multibyte.c +++ b/lib/enca/lib/multibyte.c @@ -22,6 +22,7 @@ #endif /* HAVE_CONFIG_H */ #include +#include #include "enca.h" #include "internal.h" diff --git a/lib/enca/lib/pair.c b/lib/enca/lib/pair.c index 4ab07e7b58..8c52d0115a 100644 --- a/lib/enca/lib/pair.c +++ b/lib/enca/lib/pair.c @@ -23,6 +23,7 @@ #include #include +#include #include "enca.h" #include "internal.h" diff --git a/lib/enca/libenca_win32/libenca_win32.vcproj b/lib/enca/libenca_win32/libenca_win32.vcproj index 16841d54f1..305d1db7ad 100644 --- a/lib/enca/libenca_win32/libenca_win32.vcproj +++ b/lib/enca/libenca_win32/libenca_win32.vcproj @@ -42,7 +42,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories=".\;..\" - PreprocessorDefinitions="WIN32;_DEBUG;_LIB;HAVE_CONFIG_H" + PreprocessorDefinitions="WIN32;_DEBUG;_LIB;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" @@ -108,7 +108,7 @@ EnableIntrinsicFunctions="true" WholeProgramOptimization="false" AdditionalIncludeDirectories=".\;..\" - PreprocessorDefinitions="WIN32;NDEBUG;_LIB;HAVE_CONFIG_H" + PreprocessorDefinitions="WIN32;NDEBUG;_LIB;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE" RuntimeLibrary="0" EnableFunctionLevelLinking="true" UsePrecompiledHeader="0" diff --git a/lib/fribidi/libfridibidi/libfridibidi.vcproj b/lib/fribidi/libfridibidi/libfridibidi.vcproj index a5f6a1096b..217c718bfa 100644 --- a/lib/fribidi/libfridibidi/libfridibidi.vcproj +++ b/lib/fribidi/libfridibidi/libfridibidi.vcproj @@ -42,7 +42,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\;." - PreprocessorDefinitions="WIN32;_DEBUG;_LIB" + PreprocessorDefinitions="WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" @@ -107,7 +107,7 @@ Optimization="2" EnableIntrinsicFunctions="true" AdditionalIncludeDirectories="..\;." - PreprocessorDefinitions="WIN32;NDEBUG;_LIB" + PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE" RuntimeLibrary="0" EnableFunctionLevelLinking="true" UsePrecompiledHeader="0" @@ -156,10 +156,6 @@ RelativePath="..\fribidi.c" > - - @@ -196,18 +192,10 @@ RelativePath="..\fribidi_char_type.c" > - - - - diff --git a/lib/libcdio/lib/driver/portable.h b/lib/libcdio/lib/driver/portable.h index 1f6b52e145..963b18d256 100644 --- a/lib/libcdio/lib/driver/portable.h +++ b/lib/libcdio/lib/driver/portable.h @@ -58,7 +58,9 @@ # endif # ifndef S_ISCHR -# define _S_IFCHR 0020000 /* character special */ +# ifndef _S_IFCHR +# define _S_IFCHR 0020000 /* character special */ +# endif # define S_ISCHR(x) (x & _S_IFCHR) # endif #endif /*MSVC*/ diff --git a/lib/libcdio/lib/paranoia/p_block.h b/lib/libcdio/lib/paranoia/p_block.h index 80da687805..ee67ffd757 100644 --- a/lib/libcdio/lib/paranoia/p_block.h +++ b/lib/libcdio/lib/paranoia/p_block.h @@ -34,8 +34,13 @@ #define JIGGLE_MODULO 15 /* sectors */ #define MIN_SILENCE_BOUNDARY 1024 /* 16 bit words */ +#ifndef min #define min(x,y) ((x)>(y)?(y):(x)) +#endif + +#ifndef max #define max(x,y) ((x)<(y)?(y):(x)) +#endif #include "isort.h" diff --git a/lib/libcdio/libcdio.vcproj b/lib/libcdio/libcdio.vcproj index 04a8a99c0a..00eb9a8299 100644 --- a/lib/libcdio/libcdio.vcproj +++ b/lib/libcdio/libcdio.vcproj @@ -42,7 +42,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="lib\msvc;include;lib;lib\driver;..\..\xbmc\win32;..\libiconv\include" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_H;MSVC" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_H;MSVC;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" @@ -113,7 +113,7 @@ FavorSizeOrSpeed="1" OmitFramePointers="true" AdditionalIncludeDirectories="lib\msvc;include;lib;lib\driver;..\..\xbmc\win32;..\libiconv\include" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;HAVE_CONFIG_H;MSVC" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;HAVE_CONFIG_H;MSVC;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE" RuntimeLibrary="0" EnableFunctionLevelLinking="true" EnableEnhancedInstructionSet="1" diff --git a/lib/libiconv/libiconv_win32/libiconv_win32.vcproj b/lib/libiconv/libiconv_win32/libiconv_win32.vcproj index 10a8cbbc6e..9b4f4364bc 100644 --- a/lib/libiconv/libiconv_win32/libiconv_win32.vcproj +++ b/lib/libiconv/libiconv_win32/libiconv_win32.vcproj @@ -42,7 +42,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories=".\;..\include;..\libcharset\include" - PreprocessorDefinitions="WIN32;_DEBUG;_LIB;IN_LIBRARY;NO_XMALLOC;ENABLE_RELOCATABLE;set_relocation_prefix=libiconv_set_relocation_prefix;relocate=libiconv_relocate" + PreprocessorDefinitions="WIN32;_DEBUG;_LIB;IN_LIBRARY;NO_XMALLOC;ENABLE_RELOCATABLE;set_relocation_prefix=libiconv_set_relocation_prefix;relocate=libiconv_relocate;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" @@ -108,7 +108,7 @@ EnableIntrinsicFunctions="true" WholeProgramOptimization="false" AdditionalIncludeDirectories=".\;..\include;..\libcharset\include" - PreprocessorDefinitions="WIN32;NDEBUG;_LIB;IN_LIBRARY;NO_XMALLOC;ENABLE_RELOCATABLE;set_relocation_prefix=libiconv_set_relocation_prefix;relocate=libiconv_relocate" + PreprocessorDefinitions="WIN32;NDEBUG;_LIB;IN_LIBRARY;NO_XMALLOC;ENABLE_RELOCATABLE;set_relocation_prefix=libiconv_set_relocation_prefix;relocate=libiconv_relocate;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE" RuntimeLibrary="0" EnableFunctionLevelLinking="true" UsePrecompiledHeader="0" @@ -153,18 +153,6 @@ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx" UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" > - - - - - - diff --git a/lib/pcre/libpcre/libpcre.vcproj b/lib/pcre/libpcre/libpcre.vcproj index 6483119d59..d6b4631d84 100644 --- a/lib/pcre/libpcre/libpcre.vcproj +++ b/lib/pcre/libpcre/libpcre.vcproj @@ -42,7 +42,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories=".;..\" - PreprocessorDefinitions="WIN32;_DEBUG;_LIB;HAVE_CONFIG_H" + PreprocessorDefinitions="WIN32;_DEBUG;_LIB;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" @@ -110,7 +110,7 @@ EnableIntrinsicFunctions="true" WholeProgramOptimization="false" AdditionalIncludeDirectories=".;..\" - PreprocessorDefinitions="WIN32;NDEBUG;_LIB;HAVE_CONFIG_H" + PreprocessorDefinitions="WIN32;NDEBUG;_LIB;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE" RuntimeLibrary="0" EnableFunctionLevelLinking="true" UsePrecompiledHeader="0" @@ -235,10 +235,10 @@ > - - + + diff --git a/project/VS2008Express/UnrarXLib.vcproj b/project/VS2008Express/UnrarXLib.vcproj index 1b9e781c88..cebf183fb2 100644 --- a/project/VS2008Express/UnrarXLib.vcproj +++ b/project/VS2008Express/UnrarXLib.vcproj @@ -1,7 +1,7 @@ diff --git a/xbmc/lib/cmyth/Win32/libcmyth.vcproj b/xbmc/lib/cmyth/Win32/libcmyth.vcproj index 07a766c318..9b7467ca3a 100644 --- a/xbmc/lib/cmyth/Win32/libcmyth.vcproj +++ b/xbmc/lib/cmyth/Win32/libcmyth.vcproj @@ -50,8 +50,7 @@ UsePrecompiledHeader="0" ProgramDataBaseFileName="$(OutDir)/libcmythd.pdb" WarningLevel="3" - Detect64BitPortabilityProblems="true" - DebugInformationFormat="4" + DebugInformationFormat="3" CompileAs="1" /> diff --git a/xbmc/lib/libRTV/crypt.c b/xbmc/lib/libRTV/crypt.c index 41e50a7f42..00b36c42e8 100644 --- a/xbmc/lib/libRTV/crypt.c +++ b/xbmc/lib/libRTV/crypt.c @@ -172,7 +172,7 @@ int rtv_encrypt(const char * plaintext, u32 plaintext_len, /* make up a key and obfuscatory material; get the time */ key = rand(); obfusc = rand(); - t = time(NULL); + t = (u32)time(NULL); p = NULL;//getenv("TIMEOFF"); if (p) diff --git a/xbmc/lib/libRTV/libRTV.vcproj b/xbmc/lib/libRTV/libRTV.vcproj index 16c02a86b6..025366fe50 100644 --- a/xbmc/lib/libRTV/libRTV.vcproj +++ b/xbmc/lib/libRTV/libRTV.vcproj @@ -41,7 +41,7 @@ #else #include +#include +#include #define snprintf _snprintf #endif /* _XBOX */ diff --git a/xbmc/lib/libXBMS/libXBMS/libXBMS.vcproj b/xbmc/lib/libXBMS/libXBMS/libXBMS.vcproj index ebefa66da4..09f0d99999 100644 --- a/xbmc/lib/libXBMS/libXBMS/libXBMS.vcproj +++ b/xbmc/lib/libXBMS/libXBMS/libXBMS.vcproj @@ -42,7 +42,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="..\..\..\win32\" - PreprocessorDefinitions="WIN32;_DEBUG;_LIB" + PreprocessorDefinitions="WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" @@ -108,7 +108,7 @@ EnableIntrinsicFunctions="true" WholeProgramOptimization="false" AdditionalIncludeDirectories="..\..\..\win32\" - PreprocessorDefinitions="WIN32;NDEBUG;_LIB" + PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE" RuntimeLibrary="0" EnableFunctionLevelLinking="true" UsePrecompiledHeader="0" diff --git a/xbmc/lib/libXDAAP/libXDAAP_win32/libXDAAP_win32.vcproj b/xbmc/lib/libXDAAP/libXDAAP_win32/libXDAAP_win32.vcproj index 0e6a83feeb..046fcc19d0 100644 --- a/xbmc/lib/libXDAAP/libXDAAP_win32/libXDAAP_win32.vcproj +++ b/xbmc/lib/libXDAAP/libXDAAP_win32/libXDAAP_win32.vcproj @@ -42,7 +42,7 @@ member))) + ((type *)((char *)(ptr)-(uintptr_t)(&((type *)0)->member))) /** * list_for_each - iterate over a list diff --git a/xbmc/lib/libsquish/vs7/squish/squish_2008.vcproj b/xbmc/lib/libsquish/vs7/squish/squish_2008.vcproj index 99742f4806..2d631541c6 100644 --- a/xbmc/lib/libsquish/vs7/squish/squish_2008.vcproj +++ b/xbmc/lib/libsquish/vs7/squish/squish_2008.vcproj @@ -50,7 +50,6 @@ ForceConformanceInForLoopScope="true" UsePrecompiledHeader="0" WarningLevel="4" - Detect64BitPortabilityProblems="true" DebugInformationFormat="3" /> @@ -110,7 +109,6 @@ RuntimeLibrary="0" UsePrecompiledHeader="0" WarningLevel="3" - Detect64BitPortabilityProblems="true" DebugInformationFormat="3" CompileAs="1" /> diff --git a/xbmc/visualizations/DirectXSpectrum/directx_spectrum.vcproj b/xbmc/visualizations/DirectXSpectrum/directx_spectrum.vcproj index d93c5d5631..cc0f6a84b9 100644 --- a/xbmc/visualizations/DirectXSpectrum/directx_spectrum.vcproj +++ b/xbmc/visualizations/DirectXSpectrum/directx_spectrum.vcproj @@ -48,7 +48,6 @@ RuntimeLibrary="3" UsePrecompiledHeader="0" WarningLevel="3" - Detect64BitPortabilityProblems="true" DebugInformationFormat="4" />