diff --git a/src/data.c b/src/data.c index 1731bc22..62333450 100644 --- a/src/data.c +++ b/src/data.c @@ -546,7 +546,7 @@ void fill_truth(char *path, char **labels, int k, float *truth) char *filename = ""; for (i = strlen(path) - 1; i >= 0; --i) { if (path[i] == '/' || path[i] == '\\') { - filename = malloc(strlen(path + i) + 1); + filename = (char*)malloc(strlen(path + i) + 1); strcpy(filename, path + i + 1); break; }