From 1b9c013dade651d6998c5b9463e4788282b12e4f Mon Sep 17 00:00:00 2001 From: chao an Date: Sat, 3 Sep 2022 20:04:11 +0800 Subject: [PATCH] sched/wqueue: fix visual studio Compiler Error C2059 Designated initializers are a C99 (or newer) feature, and Visual Studio doesn't (part) support C99 (or newer). D:\code\incubator-nuttx\sched\wqueue\kwork_thread.c(94,50): error C2059: syntax error : ',' Reference: https://docs.microsoft.com/en-us/cpp/overview/visual-cpp-language-conformance?view=msvc-160#c-standard-library-features-1 https://docs.microsoft.com/en-us/cpp/error-messages/compiler-errors-1/compiler-error-c2059?view=msvc-170 Signed-off-by: chao an --- sched/wqueue/kwork_thread.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sched/wqueue/kwork_thread.c b/sched/wqueue/kwork_thread.c index 706267d8ce..081278ffcf 100644 --- a/sched/wqueue/kwork_thread.c +++ b/sched/wqueue/kwork_thread.c @@ -79,7 +79,7 @@ struct hp_wqueue_s g_hpwork = { - {}, + {NULL, NULL}, NXSEM_INITIALIZER(0, PRIOINHERIT_FLAGS_DISABLE), }; @@ -90,7 +90,7 @@ struct hp_wqueue_s g_hpwork = struct lp_wqueue_s g_lpwork = { - {}, + {NULL, NULL}, NXSEM_INITIALIZER(0, PRIOINHERIT_FLAGS_DISABLE), };