diff --git a/libfreerdp/utils/test/CMakeLists.txt b/libfreerdp/utils/test/CMakeLists.txt index 2e8dbf153..e6ab6134c 100644 --- a/libfreerdp/utils/test/CMakeLists.txt +++ b/libfreerdp/utils/test/CMakeLists.txt @@ -1,25 +1,27 @@ -set(MODULE_NAME "TestFreeRDPutils") +set(MODULE_NAME "TestFreeRDPUtils") set(MODULE_PREFIX "TEST_FREERDP_UTILS") set(${MODULE_PREFIX}_DRIVER ${MODULE_NAME}.c) set(${MODULE_PREFIX}_TESTS - TestRingBuffer.c -) + TestRingBuffer.c) create_test_sourcelist(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_DRIVER} - ${${MODULE_PREFIX}_TESTS} -) + ${${MODULE_PREFIX}_TESTS}) add_executable(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS MONOLITHIC ${MONOLITHIC_BUILD} MODULE winpr - MODULES winpr-thread winpr-synch winpr-file winpr-utils winpr-crt freerdp-utils -) + MODULES winpr-thread winpr-synch winpr-file winpr-utils winpr-crt) + +set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS + MONOLITHIC ${MONOLITHIC_BUILD} + MODULE freerdp + MODULES freerdp-utils) target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) diff --git a/libfreerdp/utils/test/TestRingBuffer.c b/libfreerdp/utils/test/TestRingBuffer.c index 67497726e..b5cf20ba9 100644 --- a/libfreerdp/utils/test/TestRingBuffer.c +++ b/libfreerdp/utils/test/TestRingBuffer.c @@ -48,7 +48,7 @@ BOOL test_overlaps(void) for (i = 0, j = 2; i < nchunks; i++) { - for (k = 0; k < chunks[i].size; k++, j++) + for (k = 0; k < (int) chunks[i].size; k++, j++) { if (chunks[i].data[k] != (BYTE)j) goto error; @@ -123,7 +123,7 @@ int TestRingBuffer(int argc, char* argv[]) ringbuffer_commit_read_bytes(&ringBuffer, chunks[0].size); /* check retrieved bytes */ - for (i = 0; i < chunks[0].size; i++) + for (i = 0; i < (int) chunks[0].size; i++) { if (chunks[0].data[i] != i % 5) { diff --git a/winpr/libwinpr/synch/test/TestSynchCritical.c b/winpr/libwinpr/synch/test/TestSynchCritical.c index ca6f2017a..294d003ee 100644 --- a/winpr/libwinpr/synch/test/TestSynchCritical.c +++ b/winpr/libwinpr/synch/test/TestSynchCritical.c @@ -152,7 +152,7 @@ static PVOID TestSynchCritical_Main(PVOID arg) InitializeCriticalSection(&critical); - for (i=0; i<1000; i++) + for (i = 0; i < 1000; i++) { if (critical.RecursionCount != i) { @@ -200,9 +200,9 @@ static PVOID TestSynchCritical_Main(PVOID arg) dwThreadCount = sysinfo.dwNumberOfProcessors > 1 ? sysinfo.dwNumberOfProcessors : 2; - hThreads = (HANDLE*)calloc(dwThreadCount, sizeof(HANDLE)); + hThreads = (HANDLE*) calloc(dwThreadCount, sizeof(HANDLE)); - for (j=0; j < TEST_SYNC_CRITICAL_TEST1_RUNS; j++) + for (j = 0; j < TEST_SYNC_CRITICAL_TEST1_RUNS; j++) { dwSpinCount = j * 1000; InitializeCriticalSectionAndSpinCount(&critical, dwSpinCount); @@ -212,14 +212,15 @@ static PVOID TestSynchCritical_Main(PVOID arg) /* the TestSynchCritical_Test1 threads shall run until bTest1Running is FALSE */ bTest1Running = TRUE; - for (i=0; i