浏览代码

libarchive: Avoid struct init with variable

Compilers such as Borland and MIPSpro do not like struct initialization
with variables.  Initialize using assignment instead.
Brad King 12 年之前
父节点
当前提交
3218f52f11
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      Utilities/cmlibarchive/libarchive/archive_read_open_filename.c

+ 3 - 1
Utilities/cmlibarchive/libarchive/archive_read_open_filename.c

@@ -103,7 +103,9 @@ int
 archive_read_open_filename(struct archive *a, const char *filename,
     size_t block_size)
 {
-	const char *filenames[2] = { filename, NULL };
+	const char *filenames[2];
+	filenames[0] = filename;
+	filenames[1] = NULL;
 	return archive_read_open_filenames(a, filenames, block_size);
 }