Explorar o código

Merge pull request #579 from colmartofus/main-cast

Add malloc cast for clang++.
bel2125 %!s(int64=7) %!d(string=hai) anos
pai
achega
7c536e3aaa
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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");