mirror of
https://git.tukaani.org/xz.git
synced 2024-04-04 12:36:23 +02:00
liblzma: Prevent uninitialzed warning in mt stream encoder.
This change only impacts the compiler warning since it was impossible for the wait_abs struct in stream_encode_mt() to be used before it was initialized since mythread_condtime_set() will always be called before mythread_cond_timedwait(). Since the mythread.h code is different between the POSIX and Windows versions, this warning was only present on Windows builds. Thanks to Arthur S for reporting the warning and providing an initial patch.
This commit is contained in:
parent
62dd1c9bf0
commit
1155471651
1 changed files with 1 additions and 1 deletions
|
@ -743,7 +743,7 @@ stream_encode_mt(void *coder_ptr, const lzma_allocator *allocator,
|
||||||
|
|
||||||
// These are for wait_for_work().
|
// These are for wait_for_work().
|
||||||
bool has_blocked = false;
|
bool has_blocked = false;
|
||||||
mythread_condtime wait_abs;
|
mythread_condtime wait_abs = { 0 };
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
mythread_sync(coder->mutex) {
|
mythread_sync(coder->mutex) {
|
||||||
|
|
Loading…
Reference in a new issue