Index: uspace/lib/pcut/Makefile
===================================================================
--- uspace/lib/pcut/Makefile	(revision 70259a55669e39fcfc7d76d43bbf35c26ab91657)
+++ uspace/lib/pcut/Makefile	(revision 4b54bd956b3a55ffeefc87990668ef0a39c2c4a2)
@@ -23,5 +23,5 @@
 	$(PCUT_TEST_PREFIX)testlist$(PCUT_TEST_SUFFIX) \
 	$(PCUT_TEST_PREFIX)timeout$(PCUT_TEST_SUFFIX) \
-	$(PCUT_TEST_PREFIX)xmlreport$(PCUT_TEST_SUFFIX)
+	$(PCUT_TEST_PREFIX)xmlreport$(PCUT_TEST_SUFFIX) 
 
 EXTRA_CLEAN = $(SELF_TESTS)
Index: uspace/lib/pcut/README.rst
===================================================================
--- uspace/lib/pcut/README.rst	(revision 70259a55669e39fcfc7d76d43bbf35c26ab91657)
+++ 	(revision )
@@ -1,75 +1,0 @@
-PCUT: Plain C Unit Testing mini-framework
-=========================================
-
-PCUT is a very simple framework for unit testing of C code.
-Unlike many other frameworks where you need to specify manually which
-functions belong to a particular test, PCUT provides several smart
-macros that hides this and lets you focus on the most important
-part of testing only: that is, coding the test cases.
-
-This mini-framework is definitely not complete but it offers the basic
-functionality needed for writing unit tests.
-This includes the possibility to group tests into test suites, optionally
-having set-up and tear-down functions.
-There are several assert macros for evaluating the results, their highlight
-is very detailed information about the problem.
-
-The output of the test can come in two forms: either as an XML output suited
-for later processing or in the form of Test-Anything-Protocol.
-PCUT is able to capture standard output and display it together with test
-results.
-And by running each test in a separate process, the whole framework is pretty
-safe against unexpected crashes, such as null pointer dereference.
-
-More details can be found on PCUT wiki on GitHub:
-https://github.com/vhotspur/pcut/wiki
-
-
-Quick-start example
--------------------
-
-The following code tests the standard ``atoi`` function::
-
-	#include <pcut/pcut.h>
-	#include <stdlib.h>
-
-	PCUT_INIT
-
-	PCUT_TEST(atoi_zero) {
-	    PCUT_ASSERT_INT_EQUALS(0, atoi("0"));
-	}
-
-	PCUT_TEST(atoi_positive) {
-	    PCUT_ASSERT_INT_EQUALS(42, atoi("42"));
-	}
-
-	PCUT_TEST(atoi_negative) {
-	    PCUT_ASSERT_INT_EQUALS(-273, atoi("-273"));
-	}
-
-	PCUT_MAIN()
-
-As you can see, there is no manual listing of tests that form the test
-suite etc, only the tests and ``PCUT_INIT`` at the beginning and
-``PCUT_MAIN`` at the end.
-
-This code has to be linked with ``libpcut`` to get an executable that runs
-the tests and reports the results.
-
-More examples, in the form of self-tests, are available in the ``tests/``
-subdirectory.
-Other examples can be found on the Wiki.
-
-
-Building and installing
------------------------
-
-PCUT uses CMake (http://www.cmake.org/).
-On Unix systems, following commands build the library and execute the
-built-in tests::
-
-	mkdir build
-	cd build
-	cmake .. && make all test
-
-More details can be found on https://github.com/vhotspur/pcut/wiki/Building.
Index: uspace/lib/pcut/helenos.mak
===================================================================
--- uspace/lib/pcut/helenos.mak	(revision 70259a55669e39fcfc7d76d43bbf35c26ab91657)
+++ uspace/lib/pcut/helenos.mak	(revision 4b54bd956b3a55ffeefc87990668ef0a39c2c4a2)
@@ -30,4 +30,5 @@
 	src/os/helenos.c \
 	src/assert.c \
+	src/helper.c \
 	src/list.c \
 	src/main.c \
@@ -38,5 +39,5 @@
 	src/run.c
 
-EXTRA_CFLAGS = -D__helenos__
+EXTRA_CFLAGS = -D__helenos__ -Wno-unknown-pragmas
 
 LIBRARY = libpcut
Index: uspace/lib/pcut/include/pcut/asserts.h
===================================================================
--- uspace/lib/pcut/include/pcut/asserts.h	(revision 70259a55669e39fcfc7d76d43bbf35c26ab91657)
+++ uspace/lib/pcut/include/pcut/asserts.h	(revision 4b54bd956b3a55ffeefc87990668ef0a39c2c4a2)
@@ -77,5 +77,5 @@
  * @param size Size of the buffer.
  */
-void pcut_str_error(errno_t error, char *buffer, int size);
+void pcut_str_error(int error, char *buffer, int size);
 
 /** Raise assertion error (internal version).
@@ -264,6 +264,6 @@
 #define PCUT_ASSERT_ERRNO_VAL_WITH_NAME(expected_value, expected_quoted, actual_value) \
 	do {\
-		errno_t pcut_expected_eval = (expected_value); \
-		errno_t pcut_actual_eval = (actual_value); \
+		int pcut_expected_eval = (expected_value); \
+		int pcut_actual_eval = (actual_value); \
 		if (pcut_expected_eval != pcut_actual_eval) { \
 			char pcut_expected_description[100]; \
Index: uspace/lib/pcut/src/assert.c
===================================================================
--- uspace/lib/pcut/src/assert.c	(revision 70259a55669e39fcfc7d76d43bbf35c26ab91657)
+++ uspace/lib/pcut/src/assert.c	(revision 4b54bd956b3a55ffeefc87990668ef0a39c2c4a2)
@@ -43,7 +43,11 @@
 
 #include "internal.h"
+
+#pragma warning(push, 0)
 #include <setjmp.h>
 #include <stdarg.h>
 #include <stdio.h>
+#pragma warning(pop)
+
 
 /** Maximum length of failed-assert message. */
@@ -59,6 +63,5 @@
 static int message_buffer_index = 0;
 
-void pcut_failed_assertion_fmt(const char *filename, int line, const char *fmt, ...)
-{
+void pcut_failed_assertion_fmt(const char *filename, int line, const char *fmt, ...) {
 	va_list args;
 	char *current_buffer = message_buffer[message_buffer_index];
@@ -66,5 +69,5 @@
 	message_buffer_index = (message_buffer_index + 1) % MESSAGE_BUFFER_COUNT;
 
-	snprintf(current_buffer, MAX_MESSAGE_LENGTH, "%s:%d: ", filename, line);
+	pcut_snprintf(current_buffer, MAX_MESSAGE_LENGTH, "%s:%d: ", filename, line);
 	offset = pcut_str_size(current_buffer);
 
Index: uspace/lib/pcut/src/helper.c
===================================================================
--- uspace/lib/pcut/src/helper.c	(revision 4b54bd956b3a55ffeefc87990668ef0a39c2c4a2)
+++ uspace/lib/pcut/src/helper.c	(revision 4b54bd956b3a55ffeefc87990668ef0a39c2c4a2)
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 2018 Vojtech Horky
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @file
+ *
+ * Helper functions.
+ */
+
+#include "internal.h"
+
+#pragma warning(push, 0)
+#include <stdarg.h>
+#include <stdio.h>
+#pragma warning(pop)
+
+/*
+ * It seems that not all Unixes are the same and snprintf
+ * may not be always exported?
+ */
+#ifdef __unix
+extern int snprintf(char *, size_t, const char *, ...);
+#endif
+
+
+int pcut_snprintf(char *dest, size_t size, const char *format, ...) {
+	va_list args;
+	int ret;
+
+	va_start(args, format);
+
+	/*
+	 * Use sprintf_s in Windows but only with Microsoft compiler.
+	 * Namely, let MinGW use snprintf.
+	 */
+#if (defined(__WIN64) || defined(__WIN32) || defined(_WIN32)) && defined(_MSC_VER)
+	ret = _vsnprintf_s(dest, size, _TRUNCATE, format, args);
+#else
+	ret = vsnprintf(dest, size, format, args);
+#endif
+
+	va_end(args);
+
+	return ret;
+}
Index: uspace/lib/pcut/src/internal.h
===================================================================
--- uspace/lib/pcut/src/internal.h	(revision 70259a55669e39fcfc7d76d43bbf35c26ab91657)
+++ uspace/lib/pcut/src/internal.h	(revision 4b54bd956b3a55ffeefc87990668ef0a39c2c4a2)
@@ -35,5 +35,8 @@
 
 #include <pcut/pcut.h>
+
+#pragma warning(push, 0)
 #include <stdlib.h>
+#pragma warning(pop)
 
 
@@ -48,5 +51,7 @@
  */
 #ifdef PCUT_DEBUG_BUILD
+#pragma warning(push, 0)
 #include <stdio.h>
+#pragma warning(pop)
 #define PCUT_DEBUG_INTERNAL(msg, ...) \
 	fprintf(stderr, "[PCUT %s:%d]: " msg "%s", __FILE__, __LINE__, __VA_ARGS__)
@@ -78,12 +83,4 @@
  */
 #define PCUT_RUN_MODE_SINGLE 2
-
-/*
- * Use sprintf_s in Windows but only with Microsoft compiler.
- * Namely, let MinGW use snprintf.
- */
-#if (defined(__WIN64) || defined(__WIN32) || defined(_WIN32)) && defined(_MSC_VER)
-#define snprintf sprintf_s
-#endif
 
 extern int pcut_run_mode;
@@ -125,5 +122,5 @@
 	/** Test completed. */
 	void (*test_done)(pcut_item_t *, int, const char *, const char *,
-	    const char *);
+		const char *);
 };
 
@@ -135,8 +132,8 @@
 void pcut_report_test_start(pcut_item_t *test);
 void pcut_report_test_done(pcut_item_t *test, int outcome,
-    const char *error_message, const char *teardown_error_message,
-    const char *extra_output);
+		const char *error_message, const char *teardown_error_message,
+		const char *extra_output);
 void pcut_report_test_done_unparsed(pcut_item_t *test, int outcome,
-    const char *unparsed_output, size_t unparsed_output_size);
+		const char *unparsed_output, size_t unparsed_output_size);
 void pcut_report_done(void);
 
@@ -187,4 +184,8 @@
 char *pcut_str_find_char(const char *haystack, const char needle);
 
+/** Format string to a buffer.
+ *
+ */
+int pcut_snprintf(char *dest, size_t size, const char *format, ...);
 
 #endif
Index: uspace/lib/pcut/src/list.c
===================================================================
--- uspace/lib/pcut/src/list.c	(revision 70259a55669e39fcfc7d76d43bbf35c26ab91657)
+++ uspace/lib/pcut/src/list.c	(revision 4b54bd956b3a55ffeefc87990668ef0a39c2c4a2)
@@ -32,6 +32,9 @@
  */
 
+#pragma warning(push, 0)
 #include <assert.h>
 #include <stdlib.h>
+#pragma warning(pop)
+
 #include "internal.h"
 #include <pcut/pcut.h>
@@ -43,6 +46,5 @@
  * @return First item with actual content or NULL on end of list.
  */
-pcut_item_t *pcut_get_real_next(pcut_item_t *item)
-{
+pcut_item_t *pcut_get_real_next(pcut_item_t *item) {
 	if (item == NULL) {
 		return NULL;
@@ -65,6 +67,5 @@
  * @return First item with actual content or NULL on end of list.
  */
-pcut_item_t *pcut_get_real(pcut_item_t *item)
-{
+pcut_item_t *pcut_get_real(pcut_item_t *item) {
 	if (item == NULL) {
 		return NULL;
@@ -83,6 +84,5 @@
  * @param nested Head of the nested list.
  */
-static void inline_nested_lists(pcut_item_t *nested)
-{
+static void inline_nested_lists(pcut_item_t *nested) {
 	pcut_item_t *first;
 
@@ -111,6 +111,5 @@
  * @param first List head.
  */
-static void set_ids(pcut_item_t *first)
-{
+static void set_ids(pcut_item_t *first) {
 	int id = 1;
 	pcut_item_t *it;
@@ -135,6 +134,5 @@
  * @param first Head of the list.
  */
-static void detect_skipped_tests(pcut_item_t *first)
-{
+static void detect_skipped_tests(pcut_item_t *first) {
 	pcut_item_t *it;
 
@@ -172,6 +170,5 @@
  * @return Head of the fixed list.
  */
-pcut_item_t *pcut_fix_list_get_real_head(pcut_item_t *last)
-{
+pcut_item_t *pcut_fix_list_get_real_head(pcut_item_t *last) {
 	pcut_item_t *next, *it;
 
@@ -201,6 +198,5 @@
  * @return Number of tests.
  */
-int pcut_count_tests(pcut_item_t *it)
-{
+int pcut_count_tests(pcut_item_t *it) {
 	int count = 0;
 	while (it != NULL) {
Index: uspace/lib/pcut/src/main.c
===================================================================
--- uspace/lib/pcut/src/main.c	(revision 70259a55669e39fcfc7d76d43bbf35c26ab91657)
+++ uspace/lib/pcut/src/main.c	(revision 4b54bd956b3a55ffeefc87990668ef0a39c2c4a2)
@@ -34,7 +34,11 @@
 #include "internal.h"
 #include "report/report.h"
+
+#pragma warning(push, 0)
 #include <assert.h>
 #include <stdlib.h>
 #include <stdio.h>
+#pragma warning(pop)
+
 
 /** Current running mode. */
@@ -57,8 +61,7 @@
  * @return Whether @p arg is @p opt followed by a number.
  */
-int pcut_is_arg_with_number(const char *arg, const char *opt, int *value)
-{
+int pcut_is_arg_with_number(const char *arg, const char *opt, int *value) {
 	int opt_len = pcut_str_size(opt);
-	if (!pcut_str_start_equals(arg, opt, opt_len)) {
+	if (! pcut_str_start_equals(arg, opt, opt_len)) {
 		return 0;
 	}
@@ -75,6 +78,5 @@
  * @retval NULL No item with such id exists in the list.
  */
-static pcut_item_t *pcut_find_by_id(pcut_item_t *first, int id)
-{
+static pcut_item_t *pcut_find_by_id(pcut_item_t *first, int id) {
 	pcut_item_t *it = pcut_get_real(first);
 	while (it != NULL) {
@@ -94,6 +96,5 @@
  * @return Error code.
  */
-static int run_suite(pcut_item_t *suite, pcut_item_t **last, const char *prog_path)
-{
+static int run_suite(pcut_item_t *suite, pcut_item_t **last, const char *prog_path) {
 	int is_first_test = 1;
 	int total_count = 0;
@@ -159,6 +160,5 @@
  * @param first First item of the list.
  */
-static void set_setup_teardown_callbacks(pcut_item_t *first)
-{
+static void set_setup_teardown_callbacks(pcut_item_t *first) {
 	pcut_item_t *active_suite = NULL;
 	pcut_item_t *it;
@@ -192,6 +192,5 @@
  * @return Program exit code.
  */
-int pcut_main(pcut_item_t *last, int argc, char *argv[])
-{
+int pcut_main(pcut_item_t *last, int argc, char *argv[]) {
 	pcut_item_t *items = pcut_fix_list_get_real_head(last);
 	pcut_item_t *it;
Index: uspace/lib/pcut/src/os/generic.c
===================================================================
--- uspace/lib/pcut/src/os/generic.c	(revision 70259a55669e39fcfc7d76d43bbf35c26ab91657)
+++ uspace/lib/pcut/src/os/generic.c	(revision 4b54bd956b3a55ffeefc87990668ef0a39c2c4a2)
@@ -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 70259a55669e39fcfc7d76d43bbf35c26ab91657)
+++ uspace/lib/pcut/src/os/helenos.c	(revision 4b54bd956b3a55ffeefc87990668ef0a39c2c4a2)
@@ -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 70259a55669e39fcfc7d76d43bbf35c26ab91657)
+++ uspace/lib/pcut/src/os/stdc.c	(revision 4b54bd956b3a55ffeefc87990668ef0a39c2c4a2)
@@ -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 70259a55669e39fcfc7d76d43bbf35c26ab91657)
+++ uspace/lib/pcut/src/os/unix.c	(revision 4b54bd956b3a55ffeefc87990668ef0a39c2c4a2)
@@ -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 70259a55669e39fcfc7d76d43bbf35c26ab91657)
+++ 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);
 
Index: uspace/lib/pcut/src/preproc.c
===================================================================
--- uspace/lib/pcut/src/preproc.c	(revision 70259a55669e39fcfc7d76d43bbf35c26ab91657)
+++ uspace/lib/pcut/src/preproc.c	(revision 4b54bd956b3a55ffeefc87990668ef0a39c2c4a2)
@@ -27,9 +27,11 @@
  */
 
-#include <stdbool.h>
+#pragma warning(push, 0)
 #include <stdio.h>
 #include <stdlib.h>
 #include <ctype.h>
 #include <string.h>
+#pragma warning(pop)
+
 
 #define MAX_IDENTIFIER_LENGTH 256
@@ -37,16 +39,13 @@
 static int counter = 0;
 
-static void print_numbered_identifier(int value, FILE *output)
-{
+static void print_numbered_identifier(int value, FILE *output) {
 	fprintf(output, "pcut_item_%d", value);
 }
 
-static void print_numbered_identifier2(int value, FILE *output)
-{
+static void print_numbered_identifier2(int value, FILE *output) {
 	fprintf(output, "pcut_item2_%d", value);
 }
 
-static void print_numbered_identifier3(int value, FILE *output)
-{
+static void print_numbered_identifier3(int value, FILE *output) {
 	fprintf(output, "pcut_item3_%d", value);
 }
@@ -57,12 +56,10 @@
 } identifier_t;
 
-static void identifier_init(identifier_t *identifier)
-{
+static void identifier_init(identifier_t *identifier) {
 	identifier->name[0] = 0;
 	identifier->length = 0;
 }
 
-static void identifier_add_char(identifier_t *identifier, char c)
-{
+static void identifier_add_char(identifier_t *identifier, char c) {
 	if (identifier->length + 1 >= MAX_IDENTIFIER_LENGTH) {
 		fprintf(stderr, "Identifier %s is too long, aborting!\n", identifier->name);
@@ -75,6 +72,5 @@
 }
 
-static void identifier_print_or_expand(identifier_t *identifier, FILE *output)
-{
+static void identifier_print_or_expand(identifier_t *identifier, FILE *output) {
 	const char *name = identifier->name;
 	if (strcmp(name, "PCUT_ITEM_NAME") == 0) {
@@ -93,11 +89,10 @@
 }
 
-static int is_identifier_char(int c, int inside_identifier)
-{
-	return isalpha(c) || (c == '_') || (inside_identifier && isdigit(c));
+static int is_identifier_char(int c, int inside_identifier) {
+	return isalpha(c) || (c == '_')
+			|| (inside_identifier && isdigit(c));
 }
 
-int main(int argc, char *argv[])
-{
+int main(int argc, char *argv[]) {
 	FILE *input = stdin;
 	FILE *output = stdout;
@@ -110,5 +105,5 @@
 	(void) argv;
 
-	while (true) {
+	while (1) {
 		int current_char_denotes_identifier;
 
Index: uspace/lib/pcut/src/print.c
===================================================================
--- uspace/lib/pcut/src/print.c	(revision 70259a55669e39fcfc7d76d43bbf35c26ab91657)
+++ uspace/lib/pcut/src/print.c	(revision 4b54bd956b3a55ffeefc87990668ef0a39c2c4a2)
@@ -33,7 +33,11 @@
 
 #include <pcut/pcut.h>
+
+#pragma warning(push, 0)
 #include <stdio.h>
 #include <stdlib.h>
 #include <assert.h>
+#pragma warning(pop)
+
 #include "internal.h"
 
@@ -42,6 +46,5 @@
  * @param first First item to be printed.
  */
-void pcut_print_items(pcut_item_t *first)
-{
+void pcut_print_items(pcut_item_t *first) {
 	pcut_item_t *it = first;
 	printf("====>\n");
@@ -72,6 +75,5 @@
  * @param first First item to be printed.
  */
-void pcut_print_tests(pcut_item_t *first)
-{
+void pcut_print_tests(pcut_item_t *first) {
 	pcut_item_t *it;
 	for (it = pcut_get_real(first); it != NULL; it = pcut_get_real_next(it)) {
Index: uspace/lib/pcut/src/report/report.c
===================================================================
--- uspace/lib/pcut/src/report/report.c	(revision 70259a55669e39fcfc7d76d43bbf35c26ab91657)
+++ uspace/lib/pcut/src/report/report.c	(revision 4b54bd956b3a55ffeefc87990668ef0a39c2c4a2)
@@ -33,11 +33,17 @@
 
 #include "../internal.h"
+
 #ifdef __helenos__
-#include <str.h>
+#include <mem.h>
 #else
+#pragma warning(push, 0)
 #include <string.h>
+#pragma warning(pop)
 #endif
-#include <stdbool.h>
+
+#pragma warning(push, 0)
 #include <stdio.h>
+#pragma warning(pop)
+
 
 /** Currently used report ops. */
@@ -68,6 +74,5 @@
  * @param msg The message to be printed.
  */
-void pcut_print_fail_message(const char *msg)
-{
+void pcut_print_fail_message(const char *msg) {
 	if (msg == NULL) {
 		return;
@@ -99,7 +104,6 @@
  */
 static void parse_command_output(const char *full_output, size_t full_output_size,
-    char *stdio_buffer, size_t stdio_buffer_size,
-    char *error_buffer, size_t error_buffer_size)
-{
+		char *stdio_buffer, size_t stdio_buffer_size,
+		char *error_buffer, size_t error_buffer_size) {
 	memset(stdio_buffer, 0, stdio_buffer_size);
 	memset(error_buffer, 0, error_buffer_size);
@@ -111,5 +115,5 @@
 	}
 
-	while (true) {
+	while (1) {
 		size_t message_length;
 
@@ -157,6 +161,5 @@
  * @param ops Functions to use.
  */
-void pcut_report_register_handler(pcut_report_ops_t *ops)
-{
+void pcut_report_register_handler(pcut_report_ops_t *ops) {
 	report_ops = ops;
 }
@@ -166,6 +169,5 @@
  * @param all_items List of all tests that could be run.
  */
-void pcut_report_init(pcut_item_t *all_items)
-{
+void pcut_report_init(pcut_item_t *all_items) {
 	REPORT_CALL(init, all_items);
 }
@@ -175,6 +177,5 @@
  * @param suite Suite that was just started.
  */
-void pcut_report_suite_start(pcut_item_t *suite)
-{
+void pcut_report_suite_start(pcut_item_t *suite) {
 	REPORT_CALL(suite_start, suite);
 }
@@ -184,6 +185,5 @@
  * @param suite Suite that just completed.
  */
-void pcut_report_suite_done(pcut_item_t *suite)
-{
+void pcut_report_suite_done(pcut_item_t *suite) {
 	REPORT_CALL(suite_done, suite);
 }
@@ -193,6 +193,5 @@
  * @param test Test to be run just about now.
  */
-void pcut_report_test_start(pcut_item_t *test)
-{
+void pcut_report_test_start(pcut_item_t *test) {
 	REPORT_CALL(test_start, test);
 }
@@ -207,9 +206,8 @@
  */
 void pcut_report_test_done(pcut_item_t *test, int outcome,
-    const char *error_message, const char *teardown_error_message,
-    const char *extra_output)
-{
+		const char *error_message, const char *teardown_error_message,
+		const char *extra_output) {
 	REPORT_CALL(test_done, test, outcome, error_message, teardown_error_message,
-	    extra_output);
+			extra_output);
 }
 
@@ -222,10 +220,9 @@
  */
 void pcut_report_test_done_unparsed(pcut_item_t *test, int outcome,
-    const char *unparsed_output, size_t unparsed_output_size)
-{
+		const char *unparsed_output, size_t unparsed_output_size) {
 
 	parse_command_output(unparsed_output, unparsed_output_size,
-	    buffer_for_extra_output, BUFFER_SIZE,
-	    buffer_for_error_messages, BUFFER_SIZE);
+			buffer_for_extra_output, BUFFER_SIZE,
+			buffer_for_error_messages, BUFFER_SIZE);
 
 	pcut_report_test_done(test, outcome, buffer_for_error_messages, NULL, buffer_for_extra_output);
@@ -235,6 +232,5 @@
  *
  */
-void pcut_report_done(void)
-{
+void pcut_report_done(void) {
 	REPORT_CALL_NO_ARGS(done);
 }
Index: uspace/lib/pcut/src/report/tap.c
===================================================================
--- uspace/lib/pcut/src/report/tap.c	(revision 70259a55669e39fcfc7d76d43bbf35c26ab91657)
+++ uspace/lib/pcut/src/report/tap.c	(revision 4b54bd956b3a55ffeefc87990668ef0a39c2c4a2)
@@ -34,8 +34,15 @@
 #include "../internal.h"
 #include "report.h"
+
 #ifndef __helenos__
+#pragma warning(push, 0)
 #include <string.h>
+#pragma warning(pop)
 #endif
+
+#pragma warning(push, 0)
 #include <stdio.h>
+#pragma warning(pop)
+
 
 /** Counter of all run tests. */
@@ -55,6 +62,5 @@
  * @param all_items Start of the list with all items.
  */
-static void tap_init(pcut_item_t *all_items)
-{
+static void tap_init(pcut_item_t *all_items) {
 	int tests_total = pcut_count_tests(all_items);
 	test_counter = 0;
@@ -68,6 +74,5 @@
  * @param suite Suite that just started.
  */
-static void tap_suite_start(pcut_item_t *suite)
-{
+static void tap_suite_start(pcut_item_t *suite) {
 	tests_in_suite = 0;
 	failed_tests_in_suite = 0;
@@ -80,12 +85,11 @@
  * @param suite Suite that just ended.
  */
-static void tap_suite_done(pcut_item_t *suite)
-{
+static void tap_suite_done(pcut_item_t *suite) {
 	if (failed_tests_in_suite == 0) {
 		printf("#> Finished suite %s (passed).\n",
-		    suite->name);
+				suite->name);
 	} else {
 		printf("#> Finished suite %s (failed %d of %d).\n",
-		    suite->name, failed_tests_in_suite, tests_in_suite);
+				suite->name, failed_tests_in_suite, tests_in_suite);
 	}
 }
@@ -97,6 +101,5 @@
  * @param test Test that is started.
  */
-static void tap_test_start(pcut_item_t *test)
-{
+static void tap_test_start(pcut_item_t *test) {
 	PCUT_UNUSED(test);
 
@@ -110,6 +113,5 @@
  * @param prefix Prefix for each new line, such as comment character.
  */
-static void print_by_lines(const char *message, const char *prefix)
-{
+static void print_by_lines(const char *message, const char *prefix) {
 	char *next_line_start;
 	if ((message == NULL) || (message[0] == 0)) {
@@ -137,7 +139,6 @@
  */
 static void tap_test_done(pcut_item_t *test, int outcome,
-    const char *error_message, const char *teardown_error_message,
-    const char *extra_output)
-{
+		const char *error_message, const char *teardown_error_message,
+		const char *extra_output) {
 	const char *test_name = test->name;
 	const char *status_str = NULL;
@@ -172,6 +173,5 @@
 
 /** Report testing done. */
-static void tap_done(void)
-{
+static void tap_done(void) {
 	if (failed_test_counter == 0) {
 		printf("#> Done: all tests passed.\n");
Index: uspace/lib/pcut/src/report/xml.c
===================================================================
--- uspace/lib/pcut/src/report/xml.c	(revision 70259a55669e39fcfc7d76d43bbf35c26ab91657)
+++ uspace/lib/pcut/src/report/xml.c	(revision 4b54bd956b3a55ffeefc87990668ef0a39c2c4a2)
@@ -34,8 +34,15 @@
 #include "../internal.h"
 #include "report.h"
+
 #ifndef __helenos__
+#pragma warning(push, 0)
 #include <string.h>
+#pragma warning(pop)
 #endif
+
+#pragma warning(push, 0)
 #include <stdio.h>
+#pragma warning(pop)
+
 
 /** Counter of all run tests. */
@@ -52,6 +59,5 @@
  * @param all_items Start of the list with all items.
  */
-static void xml_init(pcut_item_t *all_items)
-{
+static void xml_init(pcut_item_t *all_items) {
 	int tests_total = pcut_count_tests(all_items);
 	test_counter = 0;
@@ -65,6 +71,5 @@
  * @param suite Suite that just started.
  */
-static void xml_suite_start(pcut_item_t *suite)
-{
+static void xml_suite_start(pcut_item_t *suite) {
 	tests_in_suite = 0;
 	failed_tests_in_suite = 0;
@@ -77,8 +82,7 @@
  * @param suite Suite that just ended.
  */
-static void xml_suite_done(pcut_item_t *suite)
-{
+static void xml_suite_done(pcut_item_t *suite) {
 	printf("\t</suite><!-- %s: %d / %d -->\n", suite->name,
-	    failed_tests_in_suite, tests_in_suite);
+		failed_tests_in_suite, tests_in_suite);
 }
 
@@ -89,6 +93,5 @@
  * @param test Test that is started.
  */
-static void xml_test_start(pcut_item_t *test)
-{
+static void xml_test_start(pcut_item_t *test) {
 	PCUT_UNUSED(test);
 
@@ -102,6 +105,5 @@
  * @param element_name Wrapping XML element name.
  */
-static void print_by_lines(const char *message, const char *element_name)
-{
+static void print_by_lines(const char *message, const char *element_name) {
 	char *next_line_start;
 
@@ -135,7 +137,6 @@
  */
 static void xml_test_done(pcut_item_t *test, int outcome,
-    const char *error_message, const char *teardown_error_message,
-    const char *extra_output)
-{
+		const char *error_message, const char *teardown_error_message,
+		const char *extra_output) {
 	const char *test_name = test->name;
 	const char *status_str = NULL;
@@ -158,5 +159,5 @@
 
 	printf("\t\t<testcase name=\"%s\" status=\"%s\">\n", test_name,
-	    status_str);
+		status_str);
 
 	print_by_lines(error_message, "error-message");
@@ -169,6 +170,5 @@
 
 /** Report testing done. */
-static void xml_done(void)
-{
+static void xml_done(void) {
 	printf("</report>\n");
 }
Index: uspace/lib/pcut/src/run.c
===================================================================
--- uspace/lib/pcut/src/run.c	(revision 70259a55669e39fcfc7d76d43bbf35c26ab91657)
+++ uspace/lib/pcut/src/run.c	(revision 4b54bd956b3a55ffeefc87990668ef0a39c2c4a2)
@@ -33,6 +33,9 @@
 
 #include "internal.h"
+
 #ifndef PCUT_NO_LONG_JUMP
+#pragma warning(push, 0)
 #include <setjmp.h>
+#pragma warning(pop)
 #endif
 
@@ -73,6 +76,5 @@
 static int default_suite_initialized = 0;
 
-static void init_default_suite_when_needed()
-{
+static void init_default_suite_when_needed() {
 	if (default_suite_initialized) {
 		return;
@@ -92,6 +94,5 @@
  * @return Always a valid test suite item.
  */
-static pcut_item_t *pcut_find_parent_suite(pcut_item_t *it)
-{
+static pcut_item_t *pcut_find_parent_suite(pcut_item_t *it) {
 	while (it != NULL) {
 		if (it->kind == PCUT_KIND_TESTSUITE) {
@@ -108,6 +109,5 @@
  * @param func Function to run (can be NULL).
  */
-static void run_setup_teardown(pcut_setup_func_t func)
-{
+static void run_setup_teardown(pcut_setup_func_t func) {
 	if (func != NULL) {
 		func();
@@ -122,8 +122,7 @@
  * @param outcome Outcome of the current test.
  */
-static void leave_test(int outcome)
-{
+static void leave_test(int outcome) {
 	PCUT_DEBUG("leave_test(outcome=%d), will_exit=%s", outcome,
-	    leave_means_exit ? "yes" : "no");
+		leave_means_exit ? "yes" : "no");
 	if (leave_means_exit) {
 		exit(outcome);
@@ -142,6 +141,5 @@
  * @param message Message describing the failure.
  */
-void pcut_failed_assertion(const char *message)
-{
+void pcut_failed_assertion(const char *message) {
 	static const char *prev_message = NULL;
 	/*
@@ -162,10 +160,10 @@
 		if (report_test_result) {
 			pcut_report_test_done(current_test, PCUT_OUTCOME_FAIL,
-			    message, NULL, NULL);
+				message, NULL, NULL);
 		}
 	} else {
 		if (report_test_result) {
 			pcut_report_test_done(current_test, PCUT_OUTCOME_FAIL,
-			    prev_message, message, NULL);
+				prev_message, message, NULL);
 		}
 	}
@@ -181,6 +179,5 @@
  * @return Error status (zero means success).
  */
-static int run_test(pcut_item_t *test)
-{
+static int run_test(pcut_item_t *test) {
 	/*
 	 * Set here as the returning point in case of test failure.
@@ -234,5 +231,5 @@
 	if (report_test_result) {
 		pcut_report_test_done(current_test, PCUT_OUTCOME_PASS,
-		    NULL, NULL, NULL);
+			NULL, NULL, NULL);
 	}
 
@@ -248,6 +245,5 @@
  * @return Error status (zero means success).
  */
-int pcut_run_test_forked(pcut_item_t *test)
-{
+int pcut_run_test_forked(pcut_item_t *test) {
 	int rc;
 
@@ -272,6 +268,5 @@
  * @return Error status (zero means success).
  */
-int pcut_run_test_single(pcut_item_t *test)
-{
+int pcut_run_test_single(pcut_item_t *test) {
 	int rc;
 
@@ -293,6 +288,5 @@
  * @return Timeout in seconds.
  */
-int pcut_get_test_timeout(pcut_item_t *test)
-{
+int pcut_get_test_timeout(pcut_item_t *test) {
 	int timeout = PCUT_DEFAULT_TEST_TIMEOUT;
 	pcut_extra_t *extras = test->extras;
Index: uspace/lib/pcut/tests/abort.c
===================================================================
--- uspace/lib/pcut/tests/abort.c	(revision 70259a55669e39fcfc7d76d43bbf35c26ab91657)
+++ uspace/lib/pcut/tests/abort.c	(revision 4b54bd956b3a55ffeefc87990668ef0a39c2c4a2)
@@ -30,10 +30,9 @@
 #include <stdlib.h>
 
-PCUT_INIT;
+PCUT_INIT
 
-PCUT_TEST(access_null_pointer)
-{
+PCUT_TEST(access_null_pointer) {
 	abort();
 }
 
-PCUT_MAIN();
+PCUT_MAIN()
Index: uspace/lib/pcut/tests/asserts.c
===================================================================
--- uspace/lib/pcut/tests/asserts.c	(revision 70259a55669e39fcfc7d76d43bbf35c26ab91657)
+++ uspace/lib/pcut/tests/asserts.c	(revision 4b54bd956b3a55ffeefc87990668ef0a39c2c4a2)
@@ -30,55 +30,46 @@
 #include "tested.h"
 
-PCUT_INIT;
+PCUT_INIT
 
-PCUT_TEST(int_equals)
-{
+PCUT_TEST(int_equals) {
 	PCUT_ASSERT_INT_EQUALS(1, 1);
 	PCUT_ASSERT_INT_EQUALS(1, 0);
 }
 
-PCUT_TEST(double_equals)
-{
+PCUT_TEST(double_equals) {
 	PCUT_ASSERT_DOUBLE_EQUALS(1., 1., 0.001);
 	PCUT_ASSERT_DOUBLE_EQUALS(1., 0.5, 0.4);
 }
 
-PCUT_TEST(str_equals)
-{
+PCUT_TEST(str_equals) {
 	PCUT_ASSERT_STR_EQUALS("xyz", "xyz");
 	PCUT_ASSERT_STR_EQUALS("abc", "xyz");
 }
 
-PCUT_TEST(str_equals_or_null_base)
-{
+PCUT_TEST(str_equals_or_null_base) {
 	PCUT_ASSERT_STR_EQUALS_OR_NULL("xyz", "xyz");
 }
 
-PCUT_TEST(str_equals_or_null_different)
-{
+PCUT_TEST(str_equals_or_null_different) {
 	PCUT_ASSERT_STR_EQUALS_OR_NULL("abc", "xyz");
 }
 
-PCUT_TEST(str_equals_or_null_one_null)
-{
+PCUT_TEST(str_equals_or_null_one_null) {
 	PCUT_ASSERT_STR_EQUALS_OR_NULL(NULL, "xyz");
 }
 
-PCUT_TEST(str_equals_or_null_both)
-{
+PCUT_TEST(str_equals_or_null_both) {
 	PCUT_ASSERT_STR_EQUALS_OR_NULL(NULL, NULL);
 }
 
-PCUT_TEST(assert_true)
-{
+PCUT_TEST(assert_true) {
 	PCUT_ASSERT_TRUE(42);
 	PCUT_ASSERT_TRUE(0);
 }
 
-PCUT_TEST(assert_false)
-{
+PCUT_TEST(assert_false) {
 	PCUT_ASSERT_FALSE(0);
 	PCUT_ASSERT_FALSE(42);
 }
 
-PCUT_MAIN();
+PCUT_MAIN()
Index: uspace/lib/pcut/tests/beforeafter.c
===================================================================
--- uspace/lib/pcut/tests/beforeafter.c	(revision 70259a55669e39fcfc7d76d43bbf35c26ab91657)
+++ uspace/lib/pcut/tests/beforeafter.c	(revision 4b54bd956b3a55ffeefc87990668ef0a39c2c4a2)
@@ -34,13 +34,5 @@
 #include <stdio.h>
 
-/*
- * Use sprintf_s in Windows but only with Microsoft compiler.
- * Namely, let MinGW use snprintf.
- */
-#if (defined(__WIN64) || defined(__WIN32) || defined(_WIN32)) && defined(_MSC_VER)
-#define snprintf sprintf_s
-#endif
-
-PCUT_INIT;
+PCUT_INIT
 
 static char *buffer = NULL;
@@ -49,19 +41,21 @@
 PCUT_TEST_SUITE(suite_with_setup_and_teardown);
 
-PCUT_TEST_BEFORE
-{
+PCUT_TEST_BEFORE {
 	buffer = malloc(BUFFER_SIZE);
 	PCUT_ASSERT_NOT_NULL(buffer);
 }
 
-PCUT_TEST_AFTER
-{
+PCUT_TEST_AFTER {
 	free(buffer);
 	buffer = NULL;
 }
 
-PCUT_TEST(test_with_setup_and_teardown)
-{
+PCUT_TEST(test_with_setup_and_teardown) {
+#if (defined(__WIN64) || defined(__WIN32) || defined(_WIN32)) && defined(_MSC_VER)
+	_snprintf_s(buffer, BUFFER_SIZE - 1, _TRUNCATE, "%d-%s", 56, "abcd");
+#else
 	snprintf(buffer, BUFFER_SIZE - 1, "%d-%s", 56, "abcd");
+#endif
+
 	PCUT_ASSERT_STR_EQUALS("56-abcd", buffer);
 }
@@ -69,9 +63,8 @@
 PCUT_TEST_SUITE(another_without_setup);
 
-PCUT_TEST(test_without_any_setup_or_teardown)
-{
+PCUT_TEST(test_without_any_setup_or_teardown) {
 	PCUT_ASSERT_NULL(buffer);
 }
 
 
-PCUT_MAIN();
+PCUT_MAIN()
Index: uspace/lib/pcut/tests/errno.c
===================================================================
--- uspace/lib/pcut/tests/errno.c	(revision 70259a55669e39fcfc7d76d43bbf35c26ab91657)
+++ uspace/lib/pcut/tests/errno.c	(revision 4b54bd956b3a55ffeefc87990668ef0a39c2c4a2)
@@ -35,9 +35,8 @@
 #endif
 
-PCUT_INIT;
+PCUT_INIT
 
-PCUT_TEST(errno_value)
-{
-	errno_t value = EOK;
+PCUT_TEST(errno_value) {
+	int value = EOK;
 	PCUT_ASSERT_ERRNO_VAL(EOK, value);
 	value = ENOENT;
@@ -48,6 +47,5 @@
 }
 
-PCUT_TEST(errno_variable)
-{
+PCUT_TEST(errno_variable) {
 	errno = ENOENT;
 	PCUT_ASSERT_ERRNO(ENOENT);
@@ -57,3 +55,3 @@
 }
 
-PCUT_MAIN();
+PCUT_MAIN()
Index: uspace/lib/pcut/tests/inithook.c
===================================================================
--- uspace/lib/pcut/tests/inithook.c	(revision 70259a55669e39fcfc7d76d43bbf35c26ab91657)
+++ uspace/lib/pcut/tests/inithook.c	(revision 4b54bd956b3a55ffeefc87990668ef0a39c2c4a2)
@@ -30,30 +30,28 @@
 #include "tested.h"
 
-PCUT_INIT;
+PCUT_INIT
 
 static int init_counter = 0;
 
-static void init_hook(void)
-{
+static void init_hook(void) {
 	init_counter++;
 }
 
-PCUT_TEST_BEFORE
-{
+PCUT_TEST_BEFORE {
 	PCUT_ASSERT_INT_EQUALS(1, init_counter);
 	init_counter++;
 }
 
-PCUT_TEST(check_init_counter)
-{
+PCUT_TEST(check_init_counter) {
 	PCUT_ASSERT_INT_EQUALS(2, init_counter);
 }
 
-PCUT_TEST(check_init_counter_2)
-{
+PCUT_TEST(check_init_counter_2) {
 	PCUT_ASSERT_INT_EQUALS(2, init_counter);
 }
 
 
-PCUT_CUSTOM_MAIN(PCUT_MAIN_SET_INIT_HOOK(init_hook));
+PCUT_CUSTOM_MAIN(
+	PCUT_MAIN_SET_INIT_HOOK(init_hook)
+)
 
Index: uspace/lib/pcut/tests/manytests.c
===================================================================
--- uspace/lib/pcut/tests/manytests.c	(revision 70259a55669e39fcfc7d76d43bbf35c26ab91657)
+++ uspace/lib/pcut/tests/manytests.c	(revision 4b54bd956b3a55ffeefc87990668ef0a39c2c4a2)
@@ -34,247 +34,87 @@
  */
 
-PCUT_INIT;
+PCUT_INIT
 
-PCUT_TEST(my_test_001)
-{
-}
-PCUT_TEST(my_test_002)
-{
-}
-PCUT_TEST(my_test_003)
-{
-}
-PCUT_TEST(my_test_004)
-{
-}
-PCUT_TEST(my_test_005)
-{
-}
-PCUT_TEST(my_test_006)
-{
-}
-PCUT_TEST(my_test_007)
-{
-}
-PCUT_TEST(my_test_008)
-{
-}
-PCUT_TEST(my_test_009)
-{
-}
-PCUT_TEST(my_test_010)
-{
-}
-PCUT_TEST(my_test_011)
-{
-}
-PCUT_TEST(my_test_012)
-{
-}
-PCUT_TEST(my_test_013)
-{
-}
-PCUT_TEST(my_test_014)
-{
-}
-PCUT_TEST(my_test_015)
-{
-}
-PCUT_TEST(my_test_016)
-{
-}
-PCUT_TEST(my_test_017)
-{
-}
-PCUT_TEST(my_test_018)
-{
-}
-PCUT_TEST(my_test_019)
-{
-}
-PCUT_TEST(my_test_020)
-{
-}
-PCUT_TEST(my_test_021)
-{
-}
-PCUT_TEST(my_test_022)
-{
-}
-PCUT_TEST(my_test_023)
-{
-}
-PCUT_TEST(my_test_024)
-{
-}
-PCUT_TEST(my_test_025)
-{
-}
-PCUT_TEST(my_test_026)
-{
-}
-PCUT_TEST(my_test_027)
-{
-}
-PCUT_TEST(my_test_028)
-{
-}
-PCUT_TEST(my_test_029)
-{
-}
-PCUT_TEST(my_test_030)
-{
-}
-PCUT_TEST(my_test_031)
-{
-}
-PCUT_TEST(my_test_032)
-{
-}
-PCUT_TEST(my_test_033)
-{
-}
-PCUT_TEST(my_test_034)
-{
-}
-PCUT_TEST(my_test_035)
-{
-}
-PCUT_TEST(my_test_036)
-{
-}
-PCUT_TEST(my_test_037)
-{
-}
-PCUT_TEST(my_test_038)
-{
-}
-PCUT_TEST(my_test_039)
-{
-}
-PCUT_TEST(my_test_040)
-{
-}
-PCUT_TEST(my_test_041)
-{
-}
-PCUT_TEST(my_test_042)
-{
-}
-PCUT_TEST(my_test_043)
-{
-}
-PCUT_TEST(my_test_044)
-{
-}
-PCUT_TEST(my_test_045)
-{
-}
-PCUT_TEST(my_test_046)
-{
-}
-PCUT_TEST(my_test_047)
-{
-}
-PCUT_TEST(my_test_048)
-{
-}
-PCUT_TEST(my_test_049)
-{
-}
-PCUT_TEST(my_test_050)
-{
-}
-PCUT_TEST(my_test_051)
-{
-}
-PCUT_TEST(my_test_052)
-{
-}
-PCUT_TEST(my_test_053)
-{
-}
-PCUT_TEST(my_test_054)
-{
-}
-PCUT_TEST(my_test_055)
-{
-}
-PCUT_TEST(my_test_056)
-{
-}
-PCUT_TEST(my_test_057)
-{
-}
-PCUT_TEST(my_test_058)
-{
-}
-PCUT_TEST(my_test_059)
-{
-}
-PCUT_TEST(my_test_060)
-{
-}
-PCUT_TEST(my_test_061)
-{
-}
-PCUT_TEST(my_test_062)
-{
-}
-PCUT_TEST(my_test_063)
-{
-}
-PCUT_TEST(my_test_064)
-{
-}
-PCUT_TEST(my_test_065)
-{
-}
-PCUT_TEST(my_test_066)
-{
-}
-PCUT_TEST(my_test_067)
-{
-}
-PCUT_TEST(my_test_068)
-{
-}
-PCUT_TEST(my_test_069)
-{
-}
-PCUT_TEST(my_test_070)
-{
-}
-PCUT_TEST(my_test_071)
-{
-}
-PCUT_TEST(my_test_072)
-{
-}
-PCUT_TEST(my_test_073)
-{
-}
-PCUT_TEST(my_test_074)
-{
-}
-PCUT_TEST(my_test_075)
-{
-}
-PCUT_TEST(my_test_076)
-{
-}
-PCUT_TEST(my_test_077)
-{
-}
-PCUT_TEST(my_test_078)
-{
-}
-PCUT_TEST(my_test_079)
-{
-}
-PCUT_TEST(my_test_080)
-{
-}
+PCUT_TEST(my_test_001) { }
+PCUT_TEST(my_test_002) { }
+PCUT_TEST(my_test_003) { }
+PCUT_TEST(my_test_004) { }
+PCUT_TEST(my_test_005) { }
+PCUT_TEST(my_test_006) { }
+PCUT_TEST(my_test_007) { }
+PCUT_TEST(my_test_008) { }
+PCUT_TEST(my_test_009) { }
+PCUT_TEST(my_test_010) { }
+PCUT_TEST(my_test_011) { }
+PCUT_TEST(my_test_012) { }
+PCUT_TEST(my_test_013) { }
+PCUT_TEST(my_test_014) { }
+PCUT_TEST(my_test_015) { }
+PCUT_TEST(my_test_016) { }
+PCUT_TEST(my_test_017) { }
+PCUT_TEST(my_test_018) { }
+PCUT_TEST(my_test_019) { }
+PCUT_TEST(my_test_020) { }
+PCUT_TEST(my_test_021) { }
+PCUT_TEST(my_test_022) { }
+PCUT_TEST(my_test_023) { }
+PCUT_TEST(my_test_024) { }
+PCUT_TEST(my_test_025) { }
+PCUT_TEST(my_test_026) { }
+PCUT_TEST(my_test_027) { }
+PCUT_TEST(my_test_028) { }
+PCUT_TEST(my_test_029) { }
+PCUT_TEST(my_test_030) { }
+PCUT_TEST(my_test_031) { }
+PCUT_TEST(my_test_032) { }
+PCUT_TEST(my_test_033) { }
+PCUT_TEST(my_test_034) { }
+PCUT_TEST(my_test_035) { }
+PCUT_TEST(my_test_036) { }
+PCUT_TEST(my_test_037) { }
+PCUT_TEST(my_test_038) { }
+PCUT_TEST(my_test_039) { }
+PCUT_TEST(my_test_040) { }
+PCUT_TEST(my_test_041) { }
+PCUT_TEST(my_test_042) { }
+PCUT_TEST(my_test_043) { }
+PCUT_TEST(my_test_044) { }
+PCUT_TEST(my_test_045) { }
+PCUT_TEST(my_test_046) { }
+PCUT_TEST(my_test_047) { }
+PCUT_TEST(my_test_048) { }
+PCUT_TEST(my_test_049) { }
+PCUT_TEST(my_test_050) { }
+PCUT_TEST(my_test_051) { }
+PCUT_TEST(my_test_052) { }
+PCUT_TEST(my_test_053) { }
+PCUT_TEST(my_test_054) { }
+PCUT_TEST(my_test_055) { }
+PCUT_TEST(my_test_056) { }
+PCUT_TEST(my_test_057) { }
+PCUT_TEST(my_test_058) { }
+PCUT_TEST(my_test_059) { }
+PCUT_TEST(my_test_060) { }
+PCUT_TEST(my_test_061) { }
+PCUT_TEST(my_test_062) { }
+PCUT_TEST(my_test_063) { }
+PCUT_TEST(my_test_064) { }
+PCUT_TEST(my_test_065) { }
+PCUT_TEST(my_test_066) { }
+PCUT_TEST(my_test_067) { }
+PCUT_TEST(my_test_068) { }
+PCUT_TEST(my_test_069) { }
+PCUT_TEST(my_test_070) { }
+PCUT_TEST(my_test_071) { }
+PCUT_TEST(my_test_072) { }
+PCUT_TEST(my_test_073) { }
+PCUT_TEST(my_test_074) { }
+PCUT_TEST(my_test_075) { }
+PCUT_TEST(my_test_076) { }
+PCUT_TEST(my_test_077) { }
+PCUT_TEST(my_test_078) { }
+PCUT_TEST(my_test_079) { }
+PCUT_TEST(my_test_080) { }
 
 
-PCUT_MAIN();
+PCUT_MAIN()
Index: uspace/lib/pcut/tests/preinithook.c
===================================================================
--- uspace/lib/pcut/tests/preinithook.c	(revision 70259a55669e39fcfc7d76d43bbf35c26ab91657)
+++ uspace/lib/pcut/tests/preinithook.c	(revision 4b54bd956b3a55ffeefc87990668ef0a39c2c4a2)
@@ -30,15 +30,13 @@
 #include "tested.h"
 
-PCUT_INIT;
+PCUT_INIT
 
 static int init_counter = 1;
 
-static void init_hook(void)
-{
+static void init_hook(void) {
 	init_counter++;
 }
 
-static void pre_init_hook(int *argc, char **argv[])
-{
+static void pre_init_hook(int *argc, char **argv[]) {
 	(void) argc;
 	(void) argv;
@@ -46,22 +44,21 @@
 }
 
-PCUT_TEST_BEFORE
-{
+PCUT_TEST_BEFORE {
 	PCUT_ASSERT_INT_EQUALS(4, init_counter);
 	init_counter++;
 }
 
-PCUT_TEST(check_init_counter)
-{
+PCUT_TEST(check_init_counter) {
 	PCUT_ASSERT_INT_EQUALS(5, init_counter);
 }
 
-PCUT_TEST(check_init_counter_2)
-{
+PCUT_TEST(check_init_counter_2) {
 	PCUT_ASSERT_INT_EQUALS(5, init_counter);
 }
 
 
-PCUT_CUSTOM_MAIN(PCUT_MAIN_SET_INIT_HOOK(init_hook),
-    PCUT_MAIN_SET_PREINIT_HOOK(pre_init_hook));
+PCUT_CUSTOM_MAIN(
+	PCUT_MAIN_SET_INIT_HOOK(init_hook),
+	PCUT_MAIN_SET_PREINIT_HOOK(pre_init_hook)
+)
 
Index: uspace/lib/pcut/tests/printing.c
===================================================================
--- uspace/lib/pcut/tests/printing.c	(revision 70259a55669e39fcfc7d76d43bbf35c26ab91657)
+++ uspace/lib/pcut/tests/printing.c	(revision 4b54bd956b3a55ffeefc87990668ef0a39c2c4a2)
@@ -31,21 +31,18 @@
 #include <stdio.h>
 
-PCUT_INIT;
+PCUT_INIT
 
-PCUT_TEST(print_to_stdout)
-{
+PCUT_TEST(print_to_stdout) {
 	printf("Printed from a test to stdout!\n");
 }
 
-PCUT_TEST(print_to_stderr)
-{
+PCUT_TEST(print_to_stderr) {
 	fprintf(stderr, "Printed from a test to stderr!\n");
 }
 
-PCUT_TEST(print_to_stdout_and_fail)
-{
+PCUT_TEST(print_to_stdout_and_fail) {
 	printf("Printed from a test to stdout!\n");
 	PCUT_ASSERT_NOT_NULL(0);
 }
 
-PCUT_MAIN();
+PCUT_MAIN()
Index: uspace/lib/pcut/tests/simple.c
===================================================================
--- uspace/lib/pcut/tests/simple.c	(revision 70259a55669e39fcfc7d76d43bbf35c26ab91657)
+++ uspace/lib/pcut/tests/simple.c	(revision 4b54bd956b3a55ffeefc87990668ef0a39c2c4a2)
@@ -30,19 +30,16 @@
 #include "tested.h"
 
-PCUT_INIT;
+PCUT_INIT
 
-PCUT_TEST(zero_exponent)
-{
+PCUT_TEST(zero_exponent) {
 	PCUT_ASSERT_INT_EQUALS(1, intpow(2, 0));
 }
 
-PCUT_TEST(one_exponent)
-{
+PCUT_TEST(one_exponent) {
 	PCUT_ASSERT_INT_EQUALS(2, intpow(2, 1));
 	PCUT_ASSERT_INT_EQUALS(39, intpow(39, 1));
 }
 
-PCUT_TEST(same_strings)
-{
+PCUT_TEST(same_strings) {
 	const char *p = "xyz";
 	PCUT_ASSERT_STR_EQUALS("xyz", p);
@@ -50,3 +47,3 @@
 }
 
-PCUT_MAIN();
+PCUT_MAIN()
Index: uspace/lib/pcut/tests/skip.c
===================================================================
--- uspace/lib/pcut/tests/skip.c	(revision 70259a55669e39fcfc7d76d43bbf35c26ab91657)
+++ uspace/lib/pcut/tests/skip.c	(revision 4b54bd956b3a55ffeefc87990668ef0a39c2c4a2)
@@ -30,20 +30,17 @@
 #include "tested.h"
 
-PCUT_INIT;
+PCUT_INIT
 
-PCUT_TEST(normal_test)
-{
+PCUT_TEST(normal_test) {
 	PCUT_ASSERT_INT_EQUALS(1, 1);
 }
 
-PCUT_TEST(skipped, PCUT_TEST_SKIP)
-{
+PCUT_TEST(skipped, PCUT_TEST_SKIP) {
 	PCUT_ASSERT_STR_EQUALS("skip", "not skipped");
 }
 
-PCUT_TEST(again_normal_test)
-{
+PCUT_TEST(again_normal_test) {
 	PCUT_ASSERT_INT_EQUALS(1, 1);
 }
 
-PCUT_MAIN();
+PCUT_MAIN()
Index: uspace/lib/pcut/tests/suite1.c
===================================================================
--- uspace/lib/pcut/tests/suite1.c	(revision 70259a55669e39fcfc7d76d43bbf35c26ab91657)
+++ uspace/lib/pcut/tests/suite1.c	(revision 4b54bd956b3a55ffeefc87990668ef0a39c2c4a2)
@@ -30,15 +30,13 @@
 #include "tested.h"
 
-PCUT_INIT;
+PCUT_INIT
 
 PCUT_TEST_SUITE(intpow);
 
-PCUT_TEST(zero_exponent)
-{
+PCUT_TEST(zero_exponent) {
 	PCUT_ASSERT_INT_EQUALS(1, intpow(2, 0));
 }
 
-PCUT_TEST(one_exponent)
-{
+PCUT_TEST(one_exponent) {
 	PCUT_ASSERT_INT_EQUALS(2, intpow(2, 1));
 	PCUT_ASSERT_INT_EQUALS(39, intpow(39, 1));
Index: uspace/lib/pcut/tests/suite2.c
===================================================================
--- uspace/lib/pcut/tests/suite2.c	(revision 70259a55669e39fcfc7d76d43bbf35c26ab91657)
+++ uspace/lib/pcut/tests/suite2.c	(revision 4b54bd956b3a55ffeefc87990668ef0a39c2c4a2)
@@ -30,10 +30,9 @@
 #include "tested.h"
 
-PCUT_INIT;
+PCUT_INIT
 
 PCUT_TEST_SUITE(intmin);
 
-PCUT_TEST(test_min)
-{
+PCUT_TEST(test_min) {
 	PCUT_ASSERT_INT_EQUALS(5, intmin(5, 654));
 	PCUT_ASSERT_INT_EQUALS(5, intmin(654, 5));
@@ -42,6 +41,5 @@
 }
 
-PCUT_TEST(test_same_numbers)
-{
+PCUT_TEST(test_same_numbers) {
 	PCUT_ASSERT_INT_EQUALS(5, intmin(5, 5));
 	PCUT_ASSERT_INT_EQUALS(719, intmin(719, 719));
Index: uspace/lib/pcut/tests/suite_all.c
===================================================================
--- uspace/lib/pcut/tests/suite_all.c	(revision 70259a55669e39fcfc7d76d43bbf35c26ab91657)
+++ uspace/lib/pcut/tests/suite_all.c	(revision 4b54bd956b3a55ffeefc87990668ef0a39c2c4a2)
@@ -29,8 +29,8 @@
 #include <pcut/pcut.h>
 
-PCUT_INIT;
+PCUT_INIT
 
 PCUT_IMPORT(intpow_suite);
 PCUT_IMPORT(intmin_suite);
 
-PCUT_MAIN();
+PCUT_MAIN()
Index: uspace/lib/pcut/tests/suites.c
===================================================================
--- uspace/lib/pcut/tests/suites.c	(revision 70259a55669e39fcfc7d76d43bbf35c26ab91657)
+++ uspace/lib/pcut/tests/suites.c	(revision 4b54bd956b3a55ffeefc87990668ef0a39c2c4a2)
@@ -30,15 +30,13 @@
 #include "tested.h"
 
-PCUT_INIT;
+PCUT_INIT
 
 PCUT_TEST_SUITE(intpow);
 
-PCUT_TEST(zero_exponent)
-{
+PCUT_TEST(zero_exponent) {
 	PCUT_ASSERT_INT_EQUALS(1, intpow(2, 0));
 }
 
-PCUT_TEST(one_exponent)
-{
+PCUT_TEST(one_exponent) {
 	PCUT_ASSERT_INT_EQUALS(2, intpow(2, 1));
 	PCUT_ASSERT_INT_EQUALS(39, intpow(39, 1));
@@ -47,6 +45,5 @@
 PCUT_TEST_SUITE(intmin);
 
-PCUT_TEST(test_min)
-{
+PCUT_TEST(test_min) {
 	PCUT_ASSERT_INT_EQUALS(5, intmin(5, 654));
 	PCUT_ASSERT_INT_EQUALS(5, intmin(654, 5));
@@ -55,3 +52,3 @@
 }
 
-PCUT_MAIN();
+PCUT_MAIN()
Index: uspace/lib/pcut/tests/teardown.c
===================================================================
--- uspace/lib/pcut/tests/teardown.c	(revision 70259a55669e39fcfc7d76d43bbf35c26ab91657)
+++ uspace/lib/pcut/tests/teardown.c	(revision 4b54bd956b3a55ffeefc87990668ef0a39c2c4a2)
@@ -31,5 +31,5 @@
 #include "tested.h"
 
-PCUT_INIT;
+PCUT_INIT
 
 
@@ -37,15 +37,12 @@
 PCUT_TEST_SUITE(with_teardown);
 
-PCUT_TEST_AFTER
-{
+PCUT_TEST_AFTER {
 	printf("This is teardown-function.\n");
 }
 
-PCUT_TEST(empty)
-{
+PCUT_TEST(empty) {
 }
 
-PCUT_TEST(failing)
-{
+PCUT_TEST(failing) {
 	PCUT_ASSERT_INT_EQUALS(10, intmin(1, 2));
 }
@@ -55,25 +52,21 @@
 PCUT_TEST_SUITE(with_failing_teardown);
 
-PCUT_TEST_AFTER
-{
+PCUT_TEST_AFTER {
 	printf("This is failing teardown-function.\n");
 	PCUT_ASSERT_INT_EQUALS(42, intmin(10, 20));
 }
 
-PCUT_TEST(empty2)
-{
+PCUT_TEST(empty2) {
 }
 
-PCUT_TEST(printing2)
-{
+PCUT_TEST(printing2) {
 	printf("Printed before test failure.\n");
 	PCUT_ASSERT_INT_EQUALS(0, intmin(-17, -19));
 }
 
-PCUT_TEST(failing2)
-{
+PCUT_TEST(failing2) {
 	PCUT_ASSERT_INT_EQUALS(12, intmin(3, 5));
 }
 
 
-PCUT_MAIN();
+PCUT_MAIN()
Index: uspace/lib/pcut/tests/teardownaborts.c
===================================================================
--- uspace/lib/pcut/tests/teardownaborts.c	(revision 70259a55669e39fcfc7d76d43bbf35c26ab91657)
+++ uspace/lib/pcut/tests/teardownaborts.c	(revision 4b54bd956b3a55ffeefc87990668ef0a39c2c4a2)
@@ -31,16 +31,14 @@
 #include <stdlib.h>
 
-PCUT_INIT;
+PCUT_INIT
 
-PCUT_TEST_AFTER
-{
+PCUT_TEST_AFTER {
 	abort();
 }
 
-PCUT_TEST(print_and_fail)
-{
+PCUT_TEST(print_and_fail) {
 	printf("Tear-down will cause null pointer access...\n");
 	PCUT_ASSERT_NOT_NULL(NULL);
 }
 
-PCUT_MAIN();
+PCUT_MAIN()
Index: uspace/lib/pcut/tests/tested.c
===================================================================
--- uspace/lib/pcut/tests/tested.c	(revision 70259a55669e39fcfc7d76d43bbf35c26ab91657)
+++ uspace/lib/pcut/tests/tested.c	(revision 4b54bd956b3a55ffeefc87990668ef0a39c2c4a2)
@@ -31,13 +31,10 @@
 #define UNUSED(a) ((void)a)
 
-long intpow(int base, int exp)
-{
-	UNUSED(base);
-	UNUSED(exp);
+long intpow(int base, int exp) {
+	UNUSED(base); UNUSED(exp);
 	return 0;
 }
 
-int intmin(int a, int b)
-{
+int intmin(int a, int b) {
 	UNUSED(b);
 	return a;
Index: uspace/lib/pcut/tests/testlist.c
===================================================================
--- uspace/lib/pcut/tests/testlist.c	(revision 70259a55669e39fcfc7d76d43bbf35c26ab91657)
+++ uspace/lib/pcut/tests/testlist.c	(revision 4b54bd956b3a55ffeefc87990668ef0a39c2c4a2)
@@ -30,5 +30,5 @@
 #include "tested.h"
 
-PCUT_INIT;
+PCUT_INIT
 
 static char *argv_patched[] = {
@@ -38,6 +38,5 @@
 };
 
-static void pre_init_hook(int *argc, char **argv[])
-{
+static void pre_init_hook(int *argc, char **argv[]) {
 	argv_patched[0] = (*argv)[0];
 	*argc = 2;
@@ -45,10 +44,11 @@
 }
 
-PCUT_TEST(unreachable)
-{
+PCUT_TEST(unreachable) {
 	PCUT_ASSERT_TRUE(0 && "unreachable code");
 }
 
 
-PCUT_CUSTOM_MAIN(PCUT_MAIN_SET_PREINIT_HOOK(pre_init_hook));
+PCUT_CUSTOM_MAIN(
+	PCUT_MAIN_SET_PREINIT_HOOK(pre_init_hook)
+)
 
Index: uspace/lib/pcut/tests/timeout.c
===================================================================
--- uspace/lib/pcut/tests/timeout.c	(revision 70259a55669e39fcfc7d76d43bbf35c26ab91657)
+++ uspace/lib/pcut/tests/timeout.c	(revision 4b54bd956b3a55ffeefc87990668ef0a39c2c4a2)
@@ -1,4 +1,4 @@
 /*
- * Copyright (c) 2012-2013 Vojtech Horky
+ * Copyright (c) 2012-2018 Vojtech Horky
  * All rights reserved.
  *
@@ -32,5 +32,5 @@
 #include <fibril.h>
 #else
-#ifdef __unix
+#if defined(__unix) || defined(__APPLE__)
 #include <unistd.h>
 #endif
@@ -43,10 +43,9 @@
 #include "tested.h"
 
-static void my_sleep(int sec)
-{
+static void my_sleep(int sec) {
 #ifdef __helenos__
 	fibril_sleep(sec);
 #else
-#ifdef __unix
+#if defined(__unix) || defined(__APPLE__)
 	sleep(sec);
 #endif
@@ -57,8 +56,7 @@
 }
 
-PCUT_INIT;
+PCUT_INIT
 
-PCUT_TEST(shall_time_out)
-{
+PCUT_TEST(shall_time_out) {
 	printf("Text before sleeping.\n");
 	my_sleep(PCUT_DEFAULT_TEST_TIMEOUT * 5);
@@ -67,6 +65,5 @@
 
 PCUT_TEST(custom_time_out,
-    PCUT_TEST_SET_TIMEOUT(PCUT_DEFAULT_TEST_TIMEOUT * 3))
-{
+		PCUT_TEST_SET_TIMEOUT(PCUT_DEFAULT_TEST_TIMEOUT * 3)) {
 	printf("Text before sleeping.\n");
 	my_sleep(PCUT_DEFAULT_TEST_TIMEOUT * 2);
@@ -74,3 +71,3 @@
 }
 
-PCUT_MAIN();
+PCUT_MAIN()
Index: uspace/lib/pcut/tests/xmlreport.c
===================================================================
--- uspace/lib/pcut/tests/xmlreport.c	(revision 70259a55669e39fcfc7d76d43bbf35c26ab91657)
+++ uspace/lib/pcut/tests/xmlreport.c	(revision 4b54bd956b3a55ffeefc87990668ef0a39c2c4a2)
@@ -33,19 +33,16 @@
 #include "tested.h"
 
-PCUT_INIT;
+PCUT_INIT
 
-PCUT_TEST(zero_exponent)
-{
+PCUT_TEST(zero_exponent) {
 	PCUT_ASSERT_INT_EQUALS(1, intpow(2, 0));
 }
 
-PCUT_TEST(one_exponent)
-{
+PCUT_TEST(one_exponent) {
 	PCUT_ASSERT_INT_EQUALS(2, intpow(2, 1));
 	PCUT_ASSERT_INT_EQUALS(39, intpow(39, 1));
 }
 
-PCUT_TEST(same_strings)
-{
+PCUT_TEST(same_strings) {
 	const char *p = "xyz";
 	PCUT_ASSERT_STR_EQUALS("xyz", p);
@@ -53,3 +50,5 @@
 }
 
-PCUT_CUSTOM_MAIN(PCUT_MAIN_SET_XML_REPORT);
+PCUT_CUSTOM_MAIN(
+	PCUT_MAIN_SET_XML_REPORT
+)
Index: uspace/lib/pcut/update-from-master.sh
===================================================================
--- uspace/lib/pcut/update-from-master.sh	(revision 70259a55669e39fcfc7d76d43bbf35c26ab91657)
+++ uspace/lib/pcut/update-from-master.sh	(revision 4b54bd956b3a55ffeefc87990668ef0a39c2c4a2)
@@ -43,10 +43,12 @@
 fi
 
-$RUN find -not -name update-from-master.sh -delete
+$RUN find -not -name update-from-master.sh -and -not -name doc -and -not -name 'doxygroups.h' -delete
 $RUN wget -q https://github.com/vhotspur/pcut/archive/master.zip -O pcut-master.zip
 $RUN unzip -q -u pcut-master.zip
-$RUN mv -f pcut-master/* .
+$RUN mv -f pcut-master/src .
+$RUN mv -f pcut-master/include .
+$RUN mv -f pcut-master/tests .
+$RUN mv -f pcut-master/helenos*.mak .
 $RUN rm -rf pcut-master pcut-master.zip
-$RUN rm -rf contrib doc
 $RUN rm -f CMakeLists.txt *.cmake run_test.sh
 
