Module Name: src
Committed By: mrg
Date: Sat Sep 5 13:35:24 UTC 2020
Modified Files:
src/external/bsd/libarchive/dist/libarchive:
archive_read_open_filename.c
Log Message:
avoid always passing NULL to printf()-like functions
To generate a diff of this commit:
cvs rdiff -u -r1.1.1.4 -r1.2 \
src/external/bsd/libarchive/dist/libarchive/archive_read_open_filename.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/bsd/libarchive/dist/libarchive/archive_read_open_filename.c
diff -u src/external/bsd/libarchive/dist/libarchive/archive_read_open_filename.c:1.1.1.4 src/external/bsd/libarchive/dist/libarchive/archive_read_open_filename.c:1.2
--- src/external/bsd/libarchive/dist/libarchive/archive_read_open_filename.c:1.1.1.4 Thu Apr 20 12:55:36 2017
+++ src/external/bsd/libarchive/dist/libarchive/archive_read_open_filename.c Sat Sep 5 13:35:24 2020
@@ -221,7 +221,9 @@ file_open(struct archive *a, void *clien
struct read_file_data *mine = (struct read_file_data *)client_data;
void *buffer;
const char *filename = NULL;
+#if defined(_WIN32) && !defined(__CYGWIN__)
const wchar_t *wfilename = NULL;
+#endif
int fd = -1;
int is_disk_like = 0;
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
@@ -281,10 +283,12 @@ file_open(struct archive *a, void *clien
#endif
}
if (fstat(fd, &st) != 0) {
+#if defined(_WIN32) && !defined(__CYGWIN__)
if (mine->filename_type == FNT_WCS)
archive_set_error(a, errno, "Can't stat '%S'",
wfilename);
else
+#endif
archive_set_error(a, errno, "Can't stat '%s'",
filename);
goto fail;