logging: reorder designated initializers in __LOG macro

As C++ does not support designated initializers, including this file
in a c++ file caused a compilation error.
gcc allows them if they are ordered as the members appear in the
struct definition

I tested it with an application using mqtt and ethernet.

Signed-off-by: Alexander Polleti <metapsycholo@gmail.com>
This commit is contained in:
Alexander Polleti 2018-11-12 18:05:02 +01:00 committed by Andrew Boie
commit 97b7a0adb0

View file

@ -239,8 +239,8 @@ extern "C" {
(_level <= LOG_RUNTIME_FILTER(_filter))) { \ (_level <= LOG_RUNTIME_FILTER(_filter))) { \
struct log_msg_ids src_level = { \ struct log_msg_ids src_level = { \
.level = _level, \ .level = _level, \
.source_id = _id, \ .domain_id = CONFIG_LOG_DOMAIN_ID, \
.domain_id = CONFIG_LOG_DOMAIN_ID \ .source_id = _id \
}; \ }; \
__LOG_INTERNAL(src_level, _LOG_STR(__VA_ARGS__)); \ __LOG_INTERNAL(src_level, _LOG_STR(__VA_ARGS__)); \
} else if (0) { \ } else if (0) { \