From affa6147e5c4c72bb22778368743e7203ea8fd79 Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Mon, 28 Apr 2014 21:53:51 -0500 Subject: [PATCH] Fix a few format strings --- include/wimlib/error.h | 4 ++-- src/compress_parallel.c | 4 +++- src/header.c | 3 ++- src/xml.c | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/include/wimlib/error.h b/include/wimlib/error.h index 52226402..24f09de9 100644 --- a/include/wimlib/error.h +++ b/include/wimlib/error.h @@ -19,8 +19,8 @@ wimlib_printf(const tchar *format, ...) _format_attribute(printf, 1, 2); #endif /* !__WIN32__ */ -static inline int -dummy_tprintf(const tchar *format, ...) _format_attribute(printf, 1, 2) +static inline int _format_attribute(printf, 1, 2) +dummy_tprintf(const tchar *format, ...) { return 0; } diff --git a/src/compress_parallel.c b/src/compress_parallel.c index eeb9f6f2..c99c0a86 100644 --- a/src/compress_parallel.c +++ b/src/compress_parallel.c @@ -531,7 +531,9 @@ new_parallel_chunk_compressor(int out_ctype, u32 out_chunk_size, if (ret) { errno = ret; ret = WIMLIB_ERR_NOMEM; - WARNING_WITH_ERRNO("Failed to create compressor thread %u of %u"); + WARNING_WITH_ERRNO("Failed to create compressor thread %u of %u", + ctx->num_started_threads + 1, + num_threads); goto err; } } diff --git a/src/header.c b/src/header.c index f52c72b7..e4c6d67c 100644 --- a/src/header.c +++ b/src/header.c @@ -117,7 +117,8 @@ read_wim_header(WIMStruct *wim, struct wim_header *hdr) if (hdr->wim_version != WIM_VERSION_DEFAULT && hdr->wim_version != WIM_VERSION_PACKED_STREAMS) { - ERROR("\"%"TS"\": Unknown WIM version: %u", hdr->wim_version); + ERROR("\"%"TS"\": Unknown WIM version: %u", + filename, hdr->wim_version); return WIMLIB_ERR_UNKNOWN_VERSION; } diff --git a/src/xml.c b/src/xml.c index 9ef6f65f..7ff9c615 100644 --- a/src/xml.c +++ b/src/xml.c @@ -1575,7 +1575,7 @@ write_wim_xml_data(WIMStruct *wim, int image, u64 total_bytes, size_t xml_len; DEBUG("Writing WIM XML data (image=%d, offset=%"PRIu64")", - image, total_bytes, wim->out_fd.offset); + image, wim->out_fd.offset); ret = prepare_wim_xml_data(wim, image, total_bytes, &xml_data, &xml_len); -- 2.43.0