浏览代码

core: explicitly cast void* to char* in shm_char_dup()

- fix gcc 9.2 warning
- GH #2191
James Aimonetti 5 年之前
父节点
当前提交
e656ed7400
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/core/ut.h

+ 1 - 1
src/core/ut.h

@@ -808,7 +808,7 @@ static inline char* shm_char_dup(const char *src)
 	}
 
 	len = strlen(src) + 1;
-	rval = shm_malloc(len);
+	rval = (char*)shm_malloc(len);
 	if (!rval) {
 		SHM_MEM_ERROR;
 		return NULL;