summaryrefslogtreecommitdiff
path: root/lily-test.h
diff options
context:
space:
mode:
Diffstat (limited to 'lily-test.h')
-rw-r--r--lily-test.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/lily-test.h b/lily-test.h
index a4dc00a..80ba054 100644
--- a/lily-test.h
+++ b/lily-test.h
@@ -58,6 +58,7 @@
#include <stdarg.h>
#include <stdlib.h>
#include <math.h>
+#include <string.h>
#define STR_IMP(x) #x
#define STR(x) STR_IMP(x)
@@ -227,7 +228,7 @@ struct lily_global_t lily_g;
lily_test_msg_t *lily_msg_create(const char *location, const char *fmt, va_list args)
{
- lily_test_msg_t *m = malloc(sizeof(lily_test_msg_t));
+ lily_test_msg_t *m = (lily_test_msg_t*) malloc(sizeof(lily_test_msg_t));
if (m == NULL) {
return NULL;
}
@@ -239,7 +240,7 @@ lily_test_msg_t *lily_msg_create(const char *location, const char *fmt, va_list
size_t len = vsnprintf(NULL, 0, fmt, args_len) + 1;
va_end(args_len);
- m->msg = malloc(len * sizeof(char));
+ m->msg = (char*) malloc(len * sizeof(char));
if (m->msg == NULL) {
free(m);
return NULL;