@@ -82,9 +82,9 @@ LowLevelMonitor* SystemNative_LowLevelMonitor_Create(void)
8282
8383 error = pthread_cond_init (& monitor -> Condition , & conditionAttributes );
8484
85- int condAttrDestroyError = pthread_condattr_destroy (& conditionAttributes );
85+ int condAttrDestroyError ;
86+ condAttrDestroyError = pthread_condattr_destroy (& conditionAttributes );
8687 assert (condAttrDestroyError == 0 );
87- (void )condAttrDestroyError ; // unused in release build
8888#else
8989 error = pthread_cond_init (& monitor -> Condition , NULL );
9090#endif
@@ -118,18 +118,17 @@ void SystemNative_LowLevelMonitor_Destroy(LowLevelMonitor* monitor)
118118 error = pthread_mutex_destroy (& monitor -> Mutex );
119119 assert (error == 0 );
120120
121- (void )error ; // unused in release build
122-
123121 free (monitor );
124122}
125123
126124void SystemNative_LowLevelMonitor_Acquire (LowLevelMonitor * monitor )
127125{
128126 assert (monitor != NULL );
129127
130- int error = pthread_mutex_lock (& monitor -> Mutex );
128+ int error ;
129+
130+ error = pthread_mutex_lock (& monitor -> Mutex );
131131 assert (error == 0 );
132- (void )error ; // unused in release build
133132
134133 SetIsLocked (monitor , true);
135134}
@@ -140,9 +139,10 @@ void SystemNative_LowLevelMonitor_Release(LowLevelMonitor* monitor)
140139
141140 SetIsLocked (monitor , false);
142141
143- int error = pthread_mutex_unlock (& monitor -> Mutex );
142+ int error ;
143+
144+ error = pthread_mutex_unlock (& monitor -> Mutex );
144145 assert (error == 0 );
145- (void )error ; // unused in release build
146146}
147147
148148void SystemNative_LowLevelMonitor_Wait (LowLevelMonitor * monitor )
@@ -151,9 +151,10 @@ void SystemNative_LowLevelMonitor_Wait(LowLevelMonitor* monitor)
151151
152152 SetIsLocked (monitor , false);
153153
154- int error = pthread_cond_wait (& monitor -> Condition , & monitor -> Mutex );
154+ int error ;
155+
156+ error = pthread_cond_wait (& monitor -> Condition , & monitor -> Mutex );
155157 assert (error == 0 );
156- (void )error ; // unused in release build
157158
158159 SetIsLocked (monitor , true);
159160}
@@ -213,8 +214,6 @@ void SystemNative_LowLevelMonitor_Signal_Release(LowLevelMonitor* monitor)
213214
214215 error = pthread_mutex_unlock (& monitor -> Mutex );
215216 assert (error == 0 );
216-
217- (void )error ; // unused in release build
218217}
219218
220219int32_t SystemNative_CreateThread (uintptr_t stackSize , void * (* startAddress )(void * ), void * parameter )
0 commit comments