log: fix out-of-order designated initializer
This patch will fix the following c++ warning, if SPDK_LOG_REGISTER_COMPONENT is used in c++ projects. designator order for field ‘spdk_log_flag::name’ does not match declaration order in ‘spdk_log_flag’ Signed-off-by: Liu Qing <winglq@gmail.com> Change-Id: I2a709bc78d8e4329055c2cd83cddddae01fb0fa1 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10697 Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
0c15ca6a84
commit
d6d75fca2d
@ -223,8 +223,8 @@ void spdk_log_register_flag(const char *name, struct spdk_log_flag *flag);
|
||||
|
||||
#define SPDK_LOG_REGISTER_COMPONENT(FLAG) \
|
||||
struct spdk_log_flag SPDK_LOG_##FLAG = { \
|
||||
.enabled = false, \
|
||||
.name = #FLAG, \
|
||||
.enabled = false, \
|
||||
}; \
|
||||
__attribute__((constructor)) static void register_flag_##FLAG(void) \
|
||||
{ \
|
||||
|
Loading…
Reference in New Issue
Block a user