Index: uspace/lib/pcut/src/os/windows.c
===================================================================
--- uspace/lib/pcut/src/os/windows.c	(revision 1433ecda9b732f3f185f902feb26826ec2496e03)
+++ uspace/lib/pcut/src/os/windows.c	(revision 4b54bd956b3a55ffeefc87990668ef0a39c2c4a2)
@@ -39,8 +39,11 @@
 #include "../internal.h"
 
+#pragma warning(push, 0)
 #include <windows.h>
 #include <tchar.h>
 #include <stdio.h>
 #include <strsafe.h>
+#pragma warning(pop)
+
 
 
@@ -61,6 +64,5 @@
  * @param test Test that is about to be run.
  */
-static void before_test_start(pcut_item_t *test)
-{
+static void before_test_start(pcut_item_t *test) {
 	pcut_report_test_start(test);
 
@@ -74,10 +76,9 @@
  * @param failed_function_name Name of the failed function.
  */
-static void report_func_fail(pcut_item_t *test, const char *failed_function_name)
-{
+static void report_func_fail(pcut_item_t *test, const char *failed_function_name) {
 	/* TODO: get error description. */
-	sprintf_s(error_message_buffer, OUTPUT_BUFFER_SIZE - 1,
-	    "%s failed: %s.", failed_function_name, "unknown reason");
-	pcut_report_test_done(test, TEST_OUTCOME_ERROR, error_message_buffer, NULL, NULL);
+	pcut_snprintf(error_message_buffer, OUTPUT_BUFFER_SIZE - 1,
+		"%s failed: %s.", failed_function_name, "unknown reason");
+	pcut_report_test_done(test, PCUT_OUTCOME_INTERNAL_ERROR, error_message_buffer, NULL, NULL);
 }
 
@@ -93,6 +94,5 @@
  * @return Number of actually read bytes.
  */
-static size_t read_all(HANDLE fd, char *buffer, size_t buffer_size)
-{
+static size_t read_all(HANDLE fd, char *buffer, size_t buffer_size) {
 	DWORD actually_read;
 	char *buffer_start = buffer;
@@ -128,15 +128,14 @@
 };
 
-static DWORD WINAPI read_test_output_on_background(LPVOID test_output_data_ptr)
-{
+static DWORD WINAPI read_test_output_on_background(LPVOID test_output_data_ptr) {
 	size_t stderr_size = 0;
 	struct test_output_data *test_output_data = (struct test_output_data *) test_output_data_ptr;
 
 	stderr_size = read_all(test_output_data->pipe_stderr,
-	    test_output_data->output_buffer,
-	    test_output_data->output_buffer_size - 1);
+		test_output_data->output_buffer,
+		test_output_data->output_buffer_size - 1);
 	read_all(test_output_data->pipe_stdout,
-	    test_output_data->output_buffer,
-	    test_output_data->output_buffer_size - 1 - stderr_size);
+		test_output_data->output_buffer,
+		test_output_data->output_buffer_size - 1 - stderr_size);
 
 	return 0;
@@ -148,6 +147,5 @@
  * @param test Test to be run.
  */
-int pcut_run_test_forking(const char *self_path, pcut_item_t *test)
-{
+int pcut_run_test_forking(const char *self_path, pcut_item_t *test) {
 	/* TODO: clean-up if something goes wrong "in the middle" */
 	BOOL okay = FALSE;
@@ -220,10 +218,10 @@
 
 	/* Format the command line. */
-	sprintf_s(command, PCUT_COMMAND_LINE_BUFFER_SIZE - 1,
-	    "\"%s\" -t%d", self_path, test->id);
+	pcut_snprintf(command, PCUT_COMMAND_LINE_BUFFER_SIZE - 1,
+		"\"%s\" -t%d", self_path, test->id);
 
 	/* Run the process. */
 	okay = CreateProcess(NULL, command, NULL, NULL, TRUE, 0, NULL, NULL,
-	    &start_info, &process_info);
+		&start_info, &process_info);
 
 	if (!okay) {
@@ -267,6 +265,6 @@
 
 	test_output_thread_reader = CreateThread(NULL, 0,
-	    read_test_output_on_background, &test_output_data,
-	    0, NULL);
+		read_test_output_on_background, &test_output_data,
+		0, NULL);
 
 	if (test_output_thread_reader == NULL) {
@@ -286,5 +284,5 @@
 		if (!okay) {
 			report_func_fail(test, "TerminateProcess(/* PROCESS_INFORMATION.hProcess */)");
-			return PCUT_ERROR_INTERNAL_FAILURE;
+			return PCUT_OUTCOME_INTERNAL_ERROR;
 		}
 		rc = WaitForSingleObject(process_info.hProcess, INFINITE);
@@ -314,5 +312,5 @@
 	if (rc != WAIT_OBJECT_0) {
 		report_func_fail(test, "WaitForSingleObject(/* stdout reader thread */)");
-		return PCUT_ERROR_INTERNAL_FAILURE;
+		return PCUT_OUTCOME_INTERNAL_ERROR;
 	}
 
@@ -322,6 +320,5 @@
 }
 
-void pcut_hook_before_test(pcut_item_t *test)
-{
+void pcut_hook_before_test(pcut_item_t *test) {
 	PCUT_UNUSED(test);
 
