Index: uspace/lib/pcut/src/os/generic.c
===================================================================
--- uspace/lib/pcut/src/os/generic.c	(revision bd41ac52cf7d20e9e568c519bf2cb5ac7104b86a)
+++ uspace/lib/pcut/src/os/generic.c	(revision 272a293cd1097ed3e3eca8ed70eb43f5cd0bc775)
@@ -31,5 +31,5 @@
  * Platform-dependent test execution function when system() is available.
  */
-
+#pragma warning(push, 0)
 #include <stdlib.h>
 #include <stdio.h>
@@ -38,4 +38,6 @@
 #include <assert.h>
 #include <string.h>
+#pragma warning(pop)
+
 #include "../internal.h"
 
@@ -55,7 +57,7 @@
 
 #define FORMAT_COMMAND(buffer, buffer_size, self_path, test_id, temp_file) \
-	snprintf(buffer, buffer_size, "\"\"%s\" -t%d >%s\"", self_path, test_id, temp_file)
+	pcut_snprintf(buffer, buffer_size, "\"\"%s\" -t%d >%s\"", self_path, test_id, temp_file)
 #define FORMAT_TEMP_FILENAME(buffer, buffer_size) \
-	snprintf(buffer, buffer_size, "pcut_%d.tmp", _getpid())
+	pcut_snprintf(buffer, buffer_size, "pcut_%d.tmp", _getpid())
 
 #elif defined(__unix)
@@ -63,7 +65,7 @@
 
 #define FORMAT_COMMAND(buffer, buffer_size, self_path, test_id, temp_file) \
-	snprintf(buffer, buffer_size, "%s -t%d &>%s", self_path, test_id, temp_file)
+	pcut_snprintf(buffer, buffer_size, "%s -t%d &>%s", self_path, test_id, temp_file)
 #define FORMAT_TEMP_FILENAME(buffer, buffer_size) \
-	snprintf(buffer, buffer_size, "pcut_%d.tmp", getpid())
+	pcut_snprintf(buffer, buffer_size, "pcut_%d.tmp", getpid())
 
 #else
@@ -81,6 +83,5 @@
  * @param test Test that is about to start.
  */
-static void before_test_start(pcut_item_t *test)
-{
+static void before_test_start(pcut_item_t *test) {
 	pcut_report_test_start(test);
 
@@ -94,6 +95,5 @@
  * @return Test outcome code.
  */
-static int convert_wait_status_to_outcome(int status)
-{
+static int convert_wait_status_to_outcome(int status) {
 	if (status < 0) {
 		return PCUT_OUTCOME_INTERNAL_ERROR;
@@ -110,6 +110,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) {
 	int rc, outcome;
 	FILE *tempfile;
@@ -121,8 +120,8 @@
 	FORMAT_TEMP_FILENAME(tempfile_name, PCUT_TEMP_FILENAME_BUFFER_SIZE - 1);
 	FORMAT_COMMAND(command, PCUT_COMMAND_LINE_BUFFER_SIZE - 1,
-	    self_path, (test)->id, tempfile_name);
-
+		self_path, (test)->id, tempfile_name);
+	
 	PCUT_DEBUG("Will execute <%s> (temp file <%s>) with system().",
-	    command, tempfile_name);
+		command, tempfile_name);
 
 	rc = system(command);
@@ -147,6 +146,5 @@
 }
 
-void pcut_hook_before_test(pcut_item_t *test)
-{
+void pcut_hook_before_test(pcut_item_t *test) {
 	PCUT_UNUSED(test);
 
Index: uspace/lib/pcut/src/os/helenos.c
===================================================================
--- uspace/lib/pcut/src/os/helenos.c	(revision bd41ac52cf7d20e9e568c519bf2cb5ac7104b86a)
+++ uspace/lib/pcut/src/os/helenos.c	(revision 272a293cd1097ed3e3eca8ed70eb43f5cd0bc775)
@@ -46,33 +46,27 @@
 /* String functions. */
 
-int pcut_str_equals(const char *a, const char *b)
-{
+int pcut_str_equals(const char *a, const char *b) {
 	return str_cmp(a, b) == 0;
 }
 
 
-int pcut_str_start_equals(const char *a, const char *b, int len)
-{
+int pcut_str_start_equals(const char *a, const char *b, int len) {
 	return str_lcmp(a, b, len) == 0;
 }
 
-int pcut_str_size(const char *s)
-{
+int pcut_str_size(const char *s) {
 	return str_size(s);
 }
 
-int pcut_str_to_int(const char *s)
-{
+int pcut_str_to_int(const char *s) {
 	int result = strtol(s, NULL, 10);
 	return result;
 }
 
-char *pcut_str_find_char(const char *haystack, const char needle)
-{
+char *pcut_str_find_char(const char *haystack, const char needle) {
 	return str_chr(haystack, needle);
 }
 
-void pcut_str_error(errno_t error, char *buffer, int size)
-{
+void pcut_str_error(int error, char *buffer, int size) {
 	const char *str = str_error(error);
 	if (str == NULL) {
@@ -107,6 +101,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);
 
@@ -116,10 +109,10 @@
 
 /** Mutex guard for forced_termination_cv. */
-static fibril_mutex_t forced_termination_mutex =
-    FIBRIL_MUTEX_INITIALIZER(forced_termination_mutex);
+static fibril_mutex_t forced_termination_mutex
+	= FIBRIL_MUTEX_INITIALIZER(forced_termination_mutex);
 
 /** Condition-variable for checking whether test timed-out. */
-static fibril_condvar_t forced_termination_cv =
-    FIBRIL_CONDVAR_INITIALIZER(forced_termination_cv);
+static fibril_condvar_t forced_termination_cv
+	= FIBRIL_CONDVAR_INITIALIZER(forced_termination_cv);
 
 /** Spawned task id. */
@@ -137,6 +130,5 @@
  * @return EOK Always.
  */
-static errno_t test_timeout_handler_fibril(void *arg)
-{
+static int test_timeout_handler_fibril(void *arg) {
 	pcut_item_t *test = arg;
 	int timeout_sec = pcut_get_test_timeout(test);
@@ -148,5 +140,5 @@
 	}
 	errno_t rc = fibril_condvar_wait_timeout(&forced_termination_cv,
-	    &forced_termination_mutex, timeout_us);
+		&forced_termination_mutex, timeout_us);
 	if (rc == ETIMEOUT) {
 		task_kill(test_task_id);
@@ -162,6 +154,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) {
 	before_test_start(test);
 
@@ -235,6 +226,5 @@
 }
 
-void pcut_hook_before_test(pcut_item_t *test)
-{
+void pcut_hook_before_test(pcut_item_t *test) {
 	PCUT_UNUSED(test);
 
Index: uspace/lib/pcut/src/os/stdc.c
===================================================================
--- uspace/lib/pcut/src/os/stdc.c	(revision bd41ac52cf7d20e9e568c519bf2cb5ac7104b86a)
+++ uspace/lib/pcut/src/os/stdc.c	(revision 272a293cd1097ed3e3eca8ed70eb43f5cd0bc775)
@@ -32,34 +32,31 @@
  */
 
+#pragma warning(push, 0)
 #include <string.h>
+#pragma warning(pop)
+
 #include "../internal.h"
 
-int pcut_str_equals(const char *a, const char *b)
-{
+int pcut_str_equals(const char *a, const char *b) {
 	return strcmp(a, b) == 0;
 }
 
-int pcut_str_start_equals(const char *a, const char *b, int len)
-{
+int pcut_str_start_equals(const char *a, const char *b, int len) {
 	return strncmp(a, b, len) == 0;
 }
 
-int pcut_str_size(const char *s)
-{
+int pcut_str_size(const char *s) {
 	return strlen(s);
 }
 
-int pcut_str_to_int(const char *s)
-{
+int pcut_str_to_int(const char *s) {
 	return atoi(s);
 }
 
-char *pcut_str_find_char(const char *haystack, const char needle)
-{
+char *pcut_str_find_char(const char *haystack, const char needle) {
 	return strchr(haystack, needle);
 }
 
-void pcut_str_error(int error, char *buffer, int size)
-{
+void pcut_str_error(int error, char *buffer, int size) {
 	const char *str = strerror(error);
 	if (str == NULL) {
Index: uspace/lib/pcut/src/os/unix.c
===================================================================
--- uspace/lib/pcut/src/os/unix.c	(revision bd41ac52cf7d20e9e568c519bf2cb5ac7104b86a)
+++ uspace/lib/pcut/src/os/unix.c	(revision 272a293cd1097ed3e3eca8ed70eb43f5cd0bc775)
@@ -64,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);
 
@@ -79,6 +78,5 @@
  * @param sig Signal number.
  */
-static void kill_child_on_alarm(int sig)
-{
+static void kill_child_on_alarm(int sig) {
 	PCUT_UNUSED(sig);
 	kill(child_pid, SIGKILL);
@@ -96,6 +94,5 @@
  * @return Number of actually read bytes.
  */
-static size_t read_all(int fd, char *buffer, size_t buffer_size)
-{
+static size_t read_all(int fd, char *buffer, size_t buffer_size) {
 	ssize_t actually_read;
 	char *buffer_start = buffer;
@@ -124,6 +121,5 @@
  * @return Test outcome code.
  */
-static int convert_wait_status_to_outcome(int status)
-{
+static int convert_wait_status_to_outcome(int status) {
 	if (WIFEXITED(status)) {
 		if (WEXITSTATUS(status) != 0) {
@@ -146,6 +142,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) {
 	int link_stdout[2], link_stderr[2];
 	int rc, status, outcome;
@@ -159,6 +154,6 @@
 	rc = pipe(link_stdout);
 	if (rc == -1) {
-		snprintf(error_message_buffer, OUTPUT_BUFFER_SIZE - 1,
-		    "pipe() failed: %s.", strerror(rc));
+		pcut_snprintf(error_message_buffer, OUTPUT_BUFFER_SIZE - 1,
+				"pipe() failed: %s.", strerror(rc));
 		pcut_report_test_done(test, PCUT_OUTCOME_INTERNAL_ERROR, error_message_buffer, NULL, NULL);
 		return PCUT_OUTCOME_INTERNAL_ERROR;
@@ -166,6 +161,6 @@
 	rc = pipe(link_stderr);
 	if (rc == -1) {
-		snprintf(error_message_buffer, OUTPUT_BUFFER_SIZE - 1,
-		    "pipe() failed: %s.", strerror(rc));
+		pcut_snprintf(error_message_buffer, OUTPUT_BUFFER_SIZE - 1,
+				"pipe() failed: %s.", strerror(rc));
 		pcut_report_test_done(test, PCUT_OUTCOME_INTERNAL_ERROR, error_message_buffer, NULL, NULL);
 		return PCUT_OUTCOME_INTERNAL_ERROR;
@@ -174,6 +169,6 @@
 	child_pid = fork();
 	if (child_pid == (pid_t)-1) {
-		snprintf(error_message_buffer, OUTPUT_BUFFER_SIZE - 1,
-		    "fork() failed: %s.", strerror(rc));
+		pcut_snprintf(error_message_buffer, OUTPUT_BUFFER_SIZE - 1,
+			"fork() failed: %s.", strerror(rc));
 		outcome = PCUT_OUTCOME_INTERNAL_ERROR;
 		goto leave_close_pipes;
@@ -220,6 +215,5 @@
 }
 
-void pcut_hook_before_test(pcut_item_t *test)
-{
+void pcut_hook_before_test(pcut_item_t *test) {
 	PCUT_UNUSED(test);
 
Index: uspace/lib/pcut/src/os/windows.c
===================================================================
--- uspace/lib/pcut/src/os/windows.c	(revision bd41ac52cf7d20e9e568c519bf2cb5ac7104b86a)
+++ uspace/lib/pcut/src/os/windows.c	(revision 272a293cd1097ed3e3eca8ed70eb43f5cd0bc775)
@@ -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);
 
