init/host_init_verifier: Fix a compiler warning
Fix the following compiler warning:
//system/core/init:host_init_verifier clang++ host_init_verifier.cp
system/core/init/host_init_verifier.cpp:112:9: warning: ISO C++ requires field designators to be specified in declaration order; field 'pw_shell' will be initialized after field 'pw_uid' [-Wreorder-init-list]
.pw_uid = 0,
^~~~~~~~~~~
system/core/init/host_init_verifier.cpp:111:21: note: previous initialization for field 'pw_shell' is here
.pw_shell = static_shell,
^~~~~~~~~~~~
Change-Id: I930c668d7fb1d12ebe9307b1549776da71a9a95a
Signed-off-by: Bart Van Assche <bvanassche@google.com>
diff --git a/init/host_init_verifier.cpp b/init/host_init_verifier.cpp
index f070776..662185c 100644
--- a/init/host_init_verifier.cpp
+++ b/init/host_init_verifier.cpp
@@ -108,9 +108,9 @@
static passwd static_passwd = {
.pw_name = static_name,
.pw_dir = static_dir,
- .pw_shell = static_shell,
.pw_uid = 0,
.pw_gid = 0,
+ .pw_shell = static_shell,
};
for (size_t n = 0; n < android_id_count; ++n) {