-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsdk patches
52 lines (51 loc) · 2.15 KB
/
sdk patches
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
diff --git a/sp/src/mathlib/mathlib.vpc b/sp/src/mathlib/mathlib.vpc
index 17021025..8ab4799d 100644
--- a/sp/src/mathlib/mathlib.vpc
+++ b/sp/src/mathlib/mathlib.vpc
@@ -13,6 +13,7 @@ $Configuration
{
$AdditionalIncludeDirectories "$BASE;..\public\mathlib"
$PreprocessorDefinitions "$BASE;MATHLIB_LIB"
+ $GCC_ExtraCompilerFlags "-Wno-narrowing" [$LINUXALL]
}
}
diff --git a/sp/src/tier1/strtools.cpp b/sp/src/tier1/strtools.cpp
index 9b1bfa84..cd0b25fa 100644
--- a/sp/src/tier1/strtools.cpp
+++ b/sp/src/tier1/strtools.cpp
@@ -1420,7 +1420,7 @@ int V_UCS2ToUnicode( const ucs2 *pUCS2, wchar_t *pUnicode, int cubDestSizeInByte
size_t nMaxUTF8 = cubDestSizeInBytes;
char *pIn = (char *)pUCS2;
char *pOut = (char *)pUnicode;
- if ( conv_t > 0 )
+ if ( conv_t > (iconv_t)0 )
{
cchResult = 0;
cchResult = iconv( conv_t, &pIn, &nLenUnicde, &pOut, &nMaxUTF8 );
@@ -1461,7 +1461,7 @@ int V_UnicodeToUCS2( const wchar_t *pUnicode, int cubSrcInBytes, char *pUCS2, in
size_t nMaxUCS2 = cubDestSizeInBytes;
char *pIn = (char*)pUnicode;
char *pOut = pUCS2;
- if ( conv_t > 0 )
+ if ( conv_t > (iconv_t)0 )
{
cchResult = 0;
cchResult = iconv( conv_t, &pIn, &nLenUnicde, &pOut, &nMaxUCS2 );
@@ -1508,7 +1508,7 @@ int V_UCS2ToUTF8( const ucs2 *pUCS2, char *pUTF8, int cubDestSizeInBytes )
size_t nMaxUTF8 = cubDestSizeInBytes - 1;
char *pIn = (char *)pUCS2;
char *pOut = (char *)pUTF8;
- if ( conv_t > 0 )
+ if ( conv_t > (iconv_t)0 )
{
cchResult = 0;
const size_t nBytesToWrite = nMaxUTF8;
@@ -1554,7 +1554,7 @@ int V_UTF8ToUCS2( const char *pUTF8, int cubSrcInBytes, ucs2 *pUCS2, int cubDest
size_t nMaxUTF8 = cubDestSizeInBytes;
char *pIn = (char *)pUTF8;
char *pOut = (char *)pUCS2;
- if ( conv_t > 0 )
+ if ( conv_t > (iconv_t)0 )
{
cchResult = 0;
cchResult = iconv( conv_t, &pIn, &nLenUnicde, &pOut, &nMaxUTF8 );