@@ -81,9 +81,9 @@ LowLevelMonitor* SystemNative_LowLevelMonitor_Create(void)
8181
8282 error = pthread_cond_init (& monitor -> Condition , & conditionAttributes );
8383
84- int condAttrDestroyError = pthread_condattr_destroy (& conditionAttributes );
84+ int condAttrDestroyError ;
85+ condAttrDestroyError = pthread_condattr_destroy (& conditionAttributes );
8586 assert (condAttrDestroyError == 0 );
86- (void )condAttrDestroyError ; // unused in release build
8787#else
8888 error = pthread_cond_init (& monitor -> Condition , NULL );
8989#endif
@@ -117,18 +117,17 @@ void SystemNative_LowLevelMonitor_Destroy(LowLevelMonitor* monitor)
117117 error = pthread_mutex_destroy (& monitor -> Mutex );
118118 assert (error == 0 );
119119
120- (void )error ; // unused in release build
121-
122120 free (monitor );
123121}
124122
125123void SystemNative_LowLevelMonitor_Acquire (LowLevelMonitor * monitor )
126124{
127125 assert (monitor != NULL );
128126
129- int error = pthread_mutex_lock (& monitor -> Mutex );
127+ int error ;
128+
129+ error = pthread_mutex_lock (& monitor -> Mutex );
130130 assert (error == 0 );
131- (void )error ; // unused in release build
132131
133132 SetIsLocked (monitor , true);
134133}
@@ -139,9 +138,10 @@ void SystemNative_LowLevelMonitor_Release(LowLevelMonitor* monitor)
139138
140139 SetIsLocked (monitor , false);
141140
142- int error = pthread_mutex_unlock (& monitor -> Mutex );
141+ int error ;
142+
143+ error = pthread_mutex_unlock (& monitor -> Mutex );
143144 assert (error == 0 );
144- (void )error ; // unused in release build
145145}
146146
147147void SystemNative_LowLevelMonitor_Wait (LowLevelMonitor * monitor )
@@ -150,9 +150,10 @@ void SystemNative_LowLevelMonitor_Wait(LowLevelMonitor* monitor)
150150
151151 SetIsLocked (monitor , false);
152152
153- int error = pthread_cond_wait (& monitor -> Condition , & monitor -> Mutex );
153+ int error ;
154+
155+ error = pthread_cond_wait (& monitor -> Condition , & monitor -> Mutex );
154156 assert (error == 0 );
155- (void )error ; // unused in release build
156157
157158 SetIsLocked (monitor , true);
158159}
@@ -212,8 +213,6 @@ void SystemNative_LowLevelMonitor_Signal_Release(LowLevelMonitor* monitor)
212213
213214 error = pthread_mutex_unlock (& monitor -> Mutex );
214215 assert (error == 0 );
215-
216- (void )error ; // unused in release build
217216}
218217
219218int32_t SystemNative_CreateThread (uintptr_t stackSize , void * (* startAddress )(void * ), void * parameter )
0 commit comments