X-Git-Url: https://wimlib.net/git/?p=wimlib;a=blobdiff_plain;f=src%2Futil.h;h=ee9598e0909d1f0176595e20e41c10b449509c44;hp=06c5045d0318f620f0f7c5e46726ebe1d1c1bfa6;hb=a4afe5a6e7fc70b3e73022f4911e7a60d67a7675;hpb=f8698b9c814a62a117982701b9551f699553b2a4 diff --git a/src/util.h b/src/util.h index 06c5045d..ee9598e0 100644 --- a/src/util.h +++ b/src/util.h @@ -151,7 +151,7 @@ wimlib_warning_with_errno(const tchar *format, ...) FORMAT(printf, 1, 2) COLD; # 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(T(format), ## __VA_ARGS__) +# define WARNING_WITH_ERRNO(format, ...) wimlib_warning_with_errno(T(format), ## __VA_ARGS__) #else /* ENABLE_ERROR_MESSAGES */ # define ERROR(format, ...) dummy_tprintf(T(format), ## __VA_ARGS__) # define ERROR_WITH_ERRNO(format, ...) dummy_tprintf(T(format), ## __VA_ARGS__) @@ -172,7 +172,7 @@ extern void wimlib_debug(const tchar *file, int line, const char *func, const tchar *format, ...); # define DEBUG(format, ...) \ - wimlib_debug(T(__FILE__), __LINE__, __func__, T(format), ## __VA_ARGS__); + wimlib_debug(T(__FILE__), __LINE__, __func__, T(format), ## __VA_ARGS__) #else # define DEBUG(format, ...) dummy_tprintf(T(format), ## __VA_ARGS__) @@ -279,4 +279,10 @@ wimlib_printf(const tchar *format, ...) FORMAT(printf, 1, 2); extern void zap_backslashes(tchar *s); +static inline u64 +hash_u64(u64 n) +{ + return n * 0x9e37fffffffc0001ULL; +} + #endif /* _WIMLIB_UTIL_H */