Braces around subobject of initialization warning fix (#32328)
authorpi1024e <49824824+pi1024e@users.noreply.github.com>
Wed, 26 Feb 2020 00:42:40 +0000 (19:42 -0500)
committerGitHub <noreply@github.com>
Wed, 26 Feb 2020 00:42:40 +0000 (16:42 -0800)
* Braces around subobject of initialization warning fix

* Fix warning

* Update lifo-semaphore.h

* Update lifo-semaphore.h

* Update lifo-semaphore.h

* Remove unnecessary braces

* Update lifo-semaphore.c

* Update lifo-semaphore.c

Co-authored-by: Ryan Lucia <ryan@luciaonline.net>
src/mono/mono/utils/lifo-semaphore.c
src/mono/mono/utils/lifo-semaphore.h

index 9ff286b..624e2bb 100644 (file)
@@ -23,7 +23,7 @@ mono_lifo_semaphore_delete (LifoSemaphore *semaphore)
 int32_t
 mono_lifo_semaphore_timed_wait (LifoSemaphore *semaphore, int32_t timeout_ms)
 {
-       LifoSemaphoreWaitEntry wait_entry = { 0 };
+       LifoSemaphoreWaitEntry wait_entry = {0};
 
        mono_coop_cond_init (&wait_entry.condition);
        mono_coop_mutex_lock (&semaphore->mutex);
index a89ee93..766f41a 100644 (file)
@@ -7,10 +7,10 @@ typedef struct _LifoSemaphore LifoSemaphore;
 typedef struct _LifoSemaphoreWaitEntry LifoSemaphoreWaitEntry;
 
 struct _LifoSemaphoreWaitEntry {
-       MonoCoopCond condition;
-       int signaled;
        LifoSemaphoreWaitEntry *previous;
        LifoSemaphoreWaitEntry *next;
+       MonoCoopCond condition;
+       int signaled;
 };
 
 struct _LifoSemaphore {