浏览代码

Add malloc cast for clang++.

Colm Sloan 7 年之前
父节点
当前提交
8ad0bffb9b
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/main.c

+ 1 - 1
src/main.c

@@ -668,7 +668,7 @@ set_option(char **options, const char *name, const char *value)
 		} else if (!strcmp(options[2 * i], name)) {
 			if (multi_sep) {
 				/* Option already set. Overwrite */
-				char *s = malloc(strlen(options[2 * i + 1]) + strlen(multi_sep)
+				char *s = (char *)malloc(strlen(options[2 * i + 1]) + strlen(multi_sep)
 				                 + strlen(value) + 1);
 				if (!s) {
 					die("Out of memory");