[fix] don't use unnamed fields in initializers
GCC did not support assigning to unnamed fields from designated initializers until 4.6 [1]. Unfortunately, CentOS 6 ships with GCC 4.4, so avoiding this C99 feature is necessary to fix building in CentOS 6 environments. [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=10676
This commit is contained in:
@@ -783,7 +783,9 @@ address_parser_t *address_parser_init(char *filename) {
|
||||
}
|
||||
|
||||
if (most_common > -1) {
|
||||
address_parser_types_t types = {.components = stats.components, .most_common = (uint16_t)most_common};
|
||||
address_parser_types_t types;
|
||||
types.components = stats.components;
|
||||
types.most_common = (uint16_t)most_common;
|
||||
|
||||
kh_value(phrase_counts, pk) = (uint32_t)phrase_types_array->n;
|
||||
address_parser_types_array_push(phrase_types_array, types);
|
||||
|
||||
Reference in New Issue
Block a user