diff --git a/hw-tests/api-demo/api/api_caller.c b/hw-tests/api-demo/api/api_caller.c
index ffac1a307ee278a85a854db30fac06ebacb209a8..f182fd9e6fe25479a67ce38256bcf952afe7155f 100644
--- a/hw-tests/api-demo/api/api_caller.c
+++ b/hw-tests/api-demo/api/api_caller.c
@@ -1,5 +1,6 @@
 void* api_call_start (uint32_t id, void* args, size_t size)
 {
+	int ret;
 	// aquire semaphore
 	ret = SEMA_GetSema (API_CALL_SEMA);
 
diff --git a/hw-tests/api-demo/api/api_caller.h b/hw-tests/api-demo/api/api_caller.h
index 6bb899488687b949823a5ee4ca377f37b72af896..ed1b58f2d78827aa5e87be638ccc85e27b0b5dcc 100644
--- a/hw-tests/api-demo/api/api_caller.h
+++ b/hw-tests/api-demo/api/api_caller.h
@@ -1,3 +1,4 @@
 #include "api_common.h"
 
-int api_call (uint32_t id, void *args);
+void* api_call (uint32_t id, void *args, size_t size);
+void* api_call_bother_dispatcher (void* buf);
diff --git a/hw-tests/api-demo/api/api_common.h b/hw-tests/api-demo/api/api_common.h
index dbf7f0c43a21bd1cb6c9cacf25e11f6a91b4d402..338d823b8eb074f78f35382956a852da2c0bdeb2 100644
--- a/hw-tests/api-demo/api/api_common.h
+++ b/hw-tests/api-demo/api/api_common.h
@@ -1,10 +1,12 @@
+#include <stdint.h>
+
 #define API_CALL_SEMA 0
 
 struct api_call
 {
 	uint32_t id;
 	uint8_t returning;
-	unsigned char *buf;
+	unsigned char buf[1];
 };
 
 static struct api_call **ApiCallSpace = (void*)0x20080001;
diff --git a/hw-tests/api-demo/api/api_dispatcher.c b/hw-tests/api-demo/api/api_dispatcher.c
index 41d3a8745ce708580a5bd33dc42e15d2aefaac7d..68fe0bab23f2e2dc2588813557bf7c6ca9c1aac3 100644
--- a/hw-tests/api-demo/api/api_dispatcher.c
+++ b/hw-tests/api-demo/api/api_dispatcher.c
@@ -6,6 +6,10 @@ api_init (sys_cfg_sema_t *sys_cfg)
 	int ret;
 
 	ret = SEMA_Init (sys_cfg);
+	/* Set the status of the flag to a valid initial state (right before
+	 * api-calls are made) */
 	ApiCallSpace->returning = 1;
+
+	return ret;
 }
 
diff --git a/hw-tests/api-demo/api/api_dispatcher.h b/hw-tests/api-demo/api/api_dispatcher.h
index 69526574b31e6d5e4d6894c4174ca9e9efa028c1..001e167930e71f6a1ef1a8ca5899c183a023b120 100644
--- a/hw-tests/api-demo/api/api_dispatcher.h
+++ b/hw-tests/api-demo/api/api_dispatcher.h
@@ -1,4 +1,5 @@
 #include "api_common.h"
+#include "mxc_sys.h"
 
 int
 api_init (sys_cfg_sema_t *sys_cfg);