zdoom-macos-deps/patch/7zip-fix-errors.diff

28 lines
670 B
Diff

--- a/C/Threads.c
+++ b/C/Threads.c
@@ -371,10 +371,11 @@
WRes Event_Set(CEvent *p)
{
+ int res1, res2;
RINOK(pthread_mutex_lock(&p->_mutex))
p->_state = True;
- int res1 = pthread_cond_broadcast(&p->_cond);
- int res2 = pthread_mutex_unlock(&p->_mutex);
+ res1 = pthread_cond_broadcast(&p->_cond);
+ res2 = pthread_mutex_unlock(&p->_mutex);
return (res2 ? res2 : res1);
}
--- a/CPP/7zip/UI/Common/EnumDirItems.cpp
+++ b/CPP/7zip/UI/Common/EnumDirItems.cpp
@@ -287,7 +287,7 @@
CObjectVector<NFind::CDirEntry> entries;
- for (unsigned ttt = 0; ; ttt++)
+ for (;;)
{
bool found;
NFind::CDirEntry de;