summaryrefslogtreecommitdiff
path: root/src/pal/tests/palsuite/debug_api/WriteProcessMemory/test1
diff options
context:
space:
mode:
Diffstat (limited to 'src/pal/tests/palsuite/debug_api/WriteProcessMemory/test1')
-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
3 files changed, 5 insertions, 5 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 39130aa..afd581f 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 1a73189..d965ca7 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 8de029d..f390c10 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",