]> wimlib.net Git - wimlib/blobdiff - include/wimlib/error.h
Remove verify_dentry(); separate refcnt recalc. from verify_inode()
[wimlib] / include / wimlib / error.h
index 7de749d3911a08e9abb5237567465de3a3ed1ff2..8dd48c180c29091bf6a1d4dfce00f01cd7f55fdf 100644 (file)
 #  define wimlib_printf         wprintf
 #else /* __WIN32__ */
 extern int
-wimlib_fprintf(FILE *fp, const tchar *format, ...) FORMAT(printf, 2, 3);
+wimlib_fprintf(FILE *fp, const tchar *format, ...) _format_attribute(printf, 2, 3);
 
 extern int
-wimlib_printf(const tchar *format, ...) FORMAT(printf, 1, 2);
+wimlib_printf(const tchar *format, ...) _format_attribute(printf, 1, 2);
 #endif /* !__WIN32__ */
 
 
-static inline int dummy_tprintf(const tchar *format, ...)
+static inline int
+dummy_tprintf(const tchar *format, ...) _format_attribute(printf, 1, 2)
 {
        return 0;
 }
 
 #ifdef ENABLE_ERROR_MESSAGES
 extern void
-wimlib_error(const tchar *format, ...) FORMAT(printf, 1, 2) COLD;
+wimlib_error(const tchar *format, ...)
+       _format_attribute(printf, 1, 2) _cold_attribute;
 
 extern void
-wimlib_error_with_errno(const tchar *format, ...) FORMAT(printf, 1, 2) COLD;
+wimlib_error_with_errno(const tchar *format, ...)
+               _format_attribute(printf, 1, 2) _cold_attribute;
 
 extern void
-wimlib_warning(const tchar *format, ...) FORMAT(printf, 1, 2) COLD;
+wimlib_warning(const tchar *format, ...)
+               _format_attribute(printf, 1, 2) _cold_attribute;
 
 extern void
-wimlib_warning_with_errno(const tchar *format, ...) FORMAT(printf, 1, 2) COLD;
+wimlib_warning_with_errno(const tchar *format, ...)
+               _format_attribute(printf, 1, 2) _cold_attribute;
 #  define ERROR(format, ...)                   wimlib_error(T(format), ## __VA_ARGS__)
 #  define ERROR_WITH_ERRNO(format, ...)        wimlib_error_with_errno(T(format), ## __VA_ARGS__)
 #  define WARNING(format, ...)                 wimlib_warning(T(format), ## __VA_ARGS__)
 #  define WARNING_WITH_ERRNO(format, ...)      wimlib_warning_with_errno(T(format), ## __VA_ARGS__)
+extern bool wimlib_print_errors;
 #else /* ENABLE_ERROR_MESSAGES */
+#  define wimlib_print_errors 0
 #  define ERROR(format, ...)                   dummy_tprintf(T(format), ## __VA_ARGS__)
 #  define ERROR_WITH_ERRNO(format, ...)                dummy_tprintf(T(format), ## __VA_ARGS__)
 #  define WARNING(format, ...)                 dummy_tprintf(T(format), ## __VA_ARGS__)
@@ -55,6 +62,7 @@ wimlib_warning_with_errno(const tchar *format, ...) FORMAT(printf, 1, 2) COLD;
 #  define ENABLE_ASSERTIONS 1
 #endif
 
+
 #ifdef ENABLE_DEBUG
 extern void
 wimlib_debug(const tchar *file, int line, const char *func,