Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corert.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJan Kotas <jkotas@microsoft.com>2017-11-14 15:13:22 +0300
committerMichal Strehovský <MichalStrehovsky@users.noreply.github.com>2017-11-14 15:13:22 +0300
commit35d86cb2477d85ef0b4bcced4010395ca4a6e972 (patch)
tree7e93b63b526f148cdb2273158891747973740cde /tests
parent749c80f7821f50e51dcd32bcd402b95eb4935f3c (diff)
Fix CppCodeGen break with latest XCode (#4926)
Latest XCode errors on ordered comparison of pointer with integer Also, fixed some unnecessary always-true comparisons that the C++ compiler emitted warnings for.
Diffstat (limited to 'tests')
-rw-r--r--tests/src/Simple/PInvoke/PInvokeNative.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/src/Simple/PInvoke/PInvokeNative.cpp b/tests/src/Simple/PInvoke/PInvokeNative.cpp
index 0853488cd..90ea1dbff 100644
--- a/tests/src/Simple/PInvoke/PInvokeNative.cpp
+++ b/tests/src/Simple/PInvoke/PInvokeNative.cpp
@@ -147,12 +147,13 @@ DLL_EXPORT int __stdcall VerifyAnsiString(char *val)
return CompareAnsiString(val, "Hello World");
}
-void CopyAnsiString(char *dst, char *src)
+void CopyAnsiString(char *dst, const char *src)
{
if (src == NULL || dst == NULL)
return;
- char *p = dst, *q = src;
+ const char *q = src;
+ char *p = dst;
while (*q)
{
*p++ = *q++;
@@ -470,7 +471,7 @@ DLL_EXPORT void __stdcall StructTest_ByRef(NativeSequentialStruct *nss)
nss->b++;
char *p = nss->str;
- while (*p != NULL)
+ while (*p != '\0')
{
*p = *p + 1;
p++;