summaryrefslogtreecommitdiff
path: root/src/pal/tests/palsuite/debug_api/WriteProcessMemory
diff options
context:
space:
mode:
Diffstat (limited to 'src/pal/tests/palsuite/debug_api/WriteProcessMemory')
-rw-r--r--src/pal/tests/palsuite/debug_api/WriteProcessMemory/test1/CMakeLists.txt4
-rw-r--r--src/pal/tests/palsuite/debug_api/WriteProcessMemory/test1/helper.cpp (renamed from src/pal/tests/palsuite/debug_api/WriteProcessMemory/test1/helper.c)2
-rw-r--r--src/pal/tests/palsuite/debug_api/WriteProcessMemory/test1/test1.cpp (renamed from src/pal/tests/palsuite/debug_api/WriteProcessMemory/test1/test1.c)4
-rw-r--r--src/pal/tests/palsuite/debug_api/WriteProcessMemory/test3/CMakeLists.txt4
-rw-r--r--src/pal/tests/palsuite/debug_api/WriteProcessMemory/test3/helper.cpp (renamed from src/pal/tests/palsuite/debug_api/WriteProcessMemory/test3/helper.c)0
-rw-r--r--src/pal/tests/palsuite/debug_api/WriteProcessMemory/test3/test3.cpp (renamed from src/pal/tests/palsuite/debug_api/WriteProcessMemory/test3/test3.c)4
-rw-r--r--src/pal/tests/palsuite/debug_api/WriteProcessMemory/test4/CMakeLists.txt4
-rw-r--r--src/pal/tests/palsuite/debug_api/WriteProcessMemory/test4/helper.cpp (renamed from src/pal/tests/palsuite/debug_api/WriteProcessMemory/test4/helper.c)0
-rw-r--r--src/pal/tests/palsuite/debug_api/WriteProcessMemory/test4/test4.cpp (renamed from src/pal/tests/palsuite/debug_api/WriteProcessMemory/test4/test4.c)0
9 files changed, 11 insertions, 11 deletions
diff --git a/src/pal/tests/palsuite/debug_api/WriteProcessMemory/test1/CMakeLists.txt b/src/pal/tests/palsuite/debug_api/WriteProcessMemory/test1/CMakeLists.txt
index 39130aac1c..afd581fb92 100644
--- a/src/pal/tests/palsuite/debug_api/WriteProcessMemory/test1/CMakeLists.txt
+++ b/src/pal/tests/palsuite/debug_api/WriteProcessMemory/test1/CMakeLists.txt
@@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(TESTSOURCES
- test1.c
+ test1.cpp
)
add_executable(paltest_writeprocessmemory_test1
@@ -20,7 +20,7 @@ target_link_libraries(paltest_writeprocessmemory_test1
set(HELPERSOURCES
- helper.c
+ helper.cpp
)
add_executable(paltest_writeprocessmemory_test1_helper
diff --git a/src/pal/tests/palsuite/debug_api/WriteProcessMemory/test1/helper.c b/src/pal/tests/palsuite/debug_api/WriteProcessMemory/test1/helper.cpp
index 1a7318969c..d965ca7a51 100644
--- a/src/pal/tests/palsuite/debug_api/WriteProcessMemory/test1/helper.c
+++ b/src/pal/tests/palsuite/debug_api/WriteProcessMemory/test1/helper.cpp
@@ -172,7 +172,7 @@ int __cdecl main(int argc, char *argv[])
/* Get the parent process to write to stuff on the heap */
sizeTarget = 2 * sizeof(int) + 23 ; /* 23 is just a random prime > 16 */
- if (!(pTarget = malloc(sizeTarget)))
+ if (!(pTarget = (char*)malloc(sizeTarget)))
{
Trace("WriteProcessMemory helper: unable to allocate '%s'->%d bytes of memory"
"(%u).\n",
diff --git a/src/pal/tests/palsuite/debug_api/WriteProcessMemory/test1/test1.c b/src/pal/tests/palsuite/debug_api/WriteProcessMemory/test1/test1.cpp
index 8de029d973..f390c10c72 100644
--- a/src/pal/tests/palsuite/debug_api/WriteProcessMemory/test1/test1.c
+++ b/src/pal/tests/palsuite/debug_api/WriteProcessMemory/test1/test1.cpp
@@ -67,7 +67,7 @@ int __cdecl main(int argc, char *argv[])
ResetEvent(hEvFromHelper);
ResetEvent(hEvToHelper);
- if (!sprintf(cmdComposeBuf, "helper %s", commsFileName))
+ if (!sprintf_s(cmdComposeBuf, _countof(cmdComposeBuf), "helper %s", commsFileName))
{
Fail("Could not convert command line\n");
}
@@ -130,7 +130,7 @@ int __cdecl main(int argc, char *argv[])
}
/* compose some data to write to the client process */
- if (!(pSrcMemory = malloc(Count)))
+ if (!(pSrcMemory = (char*)malloc(Count)))
{
Trace("could not dynamically allocate memory to copy from "
"for reasons %u & %u\n",
diff --git a/src/pal/tests/palsuite/debug_api/WriteProcessMemory/test3/CMakeLists.txt b/src/pal/tests/palsuite/debug_api/WriteProcessMemory/test3/CMakeLists.txt
index ecc0e06dac..3a5067c926 100644
--- a/src/pal/tests/palsuite/debug_api/WriteProcessMemory/test3/CMakeLists.txt
+++ b/src/pal/tests/palsuite/debug_api/WriteProcessMemory/test3/CMakeLists.txt
@@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(TESTSOURCES
- test3.c
+ test3.cpp
)
add_executable(paltest_writeprocessmemory_test3
@@ -20,7 +20,7 @@ target_link_libraries(paltest_writeprocessmemory_test3
set(HELPERSOURCES
- helper.c
+ helper.cpp
)
add_executable(paltest_writeprocessmemory_test3_helper
diff --git a/src/pal/tests/palsuite/debug_api/WriteProcessMemory/test3/helper.c b/src/pal/tests/palsuite/debug_api/WriteProcessMemory/test3/helper.cpp
index 170e2064cb..170e2064cb 100644
--- a/src/pal/tests/palsuite/debug_api/WriteProcessMemory/test3/helper.c
+++ b/src/pal/tests/palsuite/debug_api/WriteProcessMemory/test3/helper.cpp
diff --git a/src/pal/tests/palsuite/debug_api/WriteProcessMemory/test3/test3.c b/src/pal/tests/palsuite/debug_api/WriteProcessMemory/test3/test3.cpp
index 063cb4cbec..15b4b3f79d 100644
--- a/src/pal/tests/palsuite/debug_api/WriteProcessMemory/test3/test3.c
+++ b/src/pal/tests/palsuite/debug_api/WriteProcessMemory/test3/test3.cpp
@@ -67,7 +67,7 @@ int __cdecl main(int argc, char *argv[])
"(already exists!)\n", szcFromHelperEvName);
}
- if (!sprintf(cmdComposeBuf, "helper %s", commsFileName))
+ if (!sprintf_s(cmdComposeBuf, _countof(cmdComposeBuf), "helper %s", commsFileName))
{
Fail("Could not convert command line\n");
}
@@ -137,7 +137,7 @@ int __cdecl main(int argc, char *argv[])
}
/* compose some data to write to the client process */
- if (!(pSrcMemory = malloc(Count)))
+ if (!(pSrcMemory = (char*)malloc(Count)))
{
Trace("could not dynamically allocate memory to copy from "
"for reasons %u & %u\n",
diff --git a/src/pal/tests/palsuite/debug_api/WriteProcessMemory/test4/CMakeLists.txt b/src/pal/tests/palsuite/debug_api/WriteProcessMemory/test4/CMakeLists.txt
index cf1ce13862..7cba09038a 100644
--- a/src/pal/tests/palsuite/debug_api/WriteProcessMemory/test4/CMakeLists.txt
+++ b/src/pal/tests/palsuite/debug_api/WriteProcessMemory/test4/CMakeLists.txt
@@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(TESTSOURCES
- test4.c
+ test4.cpp
)
add_executable(paltest_writeprocessmemory_test4
@@ -20,7 +20,7 @@ target_link_libraries(paltest_writeprocessmemory_test4
set(HELPERSOURCES
- helper.c
+ helper.cpp
)
add_executable(paltest_writeprocessmemory_test4_helper
diff --git a/src/pal/tests/palsuite/debug_api/WriteProcessMemory/test4/helper.c b/src/pal/tests/palsuite/debug_api/WriteProcessMemory/test4/helper.cpp
index b653ea5057..b653ea5057 100644
--- a/src/pal/tests/palsuite/debug_api/WriteProcessMemory/test4/helper.c
+++ b/src/pal/tests/palsuite/debug_api/WriteProcessMemory/test4/helper.cpp
diff --git a/src/pal/tests/palsuite/debug_api/WriteProcessMemory/test4/test4.c b/src/pal/tests/palsuite/debug_api/WriteProcessMemory/test4/test4.cpp
index 51db23499b..51db23499b 100644
--- a/src/pal/tests/palsuite/debug_api/WriteProcessMemory/test4/test4.c
+++ b/src/pal/tests/palsuite/debug_api/WriteProcessMemory/test4/test4.cpp