aboutsummaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2023-01-12 04:46:45 +0200
committerJia Tan <jiat0218@gmail.com>2023-02-03 21:10:25 +0800
commit2b8062ef94a38d0f9ad0d1b309e8748db52f5c15 (patch)
tree5b825e6cda2c14b52d558e08ea53784f81c675f0 /src/common
parentBuild: Make configure add more warning flags for GCC and Clang. (diff)
downloadxz-2b8062ef94a38d0f9ad0d1b309e8748db52f5c15.tar.xz
liblzma: Silence a warning from -Wsign-conversion in a 32-bit build.
Diffstat (limited to 'src/common')
-rw-r--r--src/common/mythread.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/mythread.h b/src/common/mythread.h
index 37b5216b..7a80f966 100644
--- a/src/common/mythread.h
+++ b/src/common/mythread.h
@@ -300,8 +300,8 @@ static inline void
mythread_condtime_set(mythread_condtime *condtime, const mythread_cond *cond,
uint32_t timeout_ms)
{
- condtime->tv_sec = timeout_ms / 1000;
- condtime->tv_nsec = (timeout_ms % 1000) * 1000000;
+ condtime->tv_sec = (time_t)(timeout_ms / 1000);
+ condtime->tv_nsec = (long)((timeout_ms % 1000) * 1000000);
#ifdef HAVE_CLOCK_GETTIME
struct timespec now;