Fix a few format strings
authorEric Biggers <ebiggers3@gmail.com>
Tue, 29 Apr 2014 02:53:51 +0000 (21:53 -0500)
committerEric Biggers <ebiggers3@gmail.com>
Tue, 29 Apr 2014 02:53:51 +0000 (21:53 -0500)
include/wimlib/error.h
src/compress_parallel.c
src/header.c
src/xml.c

index 5222640..24f09de 100644 (file)
@@ -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;
 }
index eeb9f6f..c99c0a8 100644 (file)
@@ -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;
                }
        }
index f52c72b..e4c6d67 100644 (file)
@@ -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;
        }
 
index 9ef6f65..7ff9c61 100644 (file)
--- 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);