Do not use GNU old-style field designators
Avoiding the use of gnu extensions improves code portability
Change-Id: I77b81343bc9a802385453f089c55afacf1a05e4a
diff --git a/libsensors/sensors.cpp b/libsensors/sensors.cpp
index fa77ec6..6f0b223 100644
--- a/libsensors/sensors.cpp
+++ b/libsensors/sensors.cpp
@@ -84,22 +84,22 @@
}
static struct hw_module_methods_t sensors_module_methods = {
- open: open_sensors
+ .open = open_sensors
};
struct sensors_module_t HAL_MODULE_INFO_SYM = {
- common: {
- tag: HARDWARE_MODULE_TAG,
- version_major: 1,
- version_minor: 0,
- id: SENSORS_HARDWARE_MODULE_ID,
- name: "Samsung Sensor module",
- author: "Samsung Electronic Company",
- methods: &sensors_module_methods,
- dso: 0,
- reserved: {},
+ .common = {
+ .tag = HARDWARE_MODULE_TAG,
+ .version_major = 1,
+ .version_minor = 0,
+ .id = SENSORS_HARDWARE_MODULE_ID,
+ .name = "Samsung Sensor module",
+ .author = "Samsung Electronic Company",
+ .methods = &sensors_module_methods,
+ .dso = 0,
+ .reserved = {},
},
- get_sensors_list: sensors__get_sensors_list,
+ .get_sensors_list = sensors__get_sensors_list,
};
struct sensors_poll_context_t {
diff --git a/power/power_manta.c b/power/power_manta.c
index bf509ad..077520b 100644
--- a/power/power_manta.c
+++ b/power/power_manta.c
@@ -196,24 +196,24 @@
};
struct manta_power_module HAL_MODULE_INFO_SYM = {
- base: {
- common: {
- tag: HARDWARE_MODULE_TAG,
- module_api_version: POWER_MODULE_API_VERSION_0_2,
- hal_api_version: HARDWARE_HAL_API_VERSION,
- id: POWER_HARDWARE_MODULE_ID,
- name: "Manta Power HAL",
- author: "The Android Open Source Project",
- methods: &power_module_methods,
+ .base = {
+ .common = {
+ .tag = HARDWARE_MODULE_TAG,
+ .module_api_version = POWER_MODULE_API_VERSION_0_2,
+ .hal_api_version = HARDWARE_HAL_API_VERSION,
+ .id = POWER_HARDWARE_MODULE_ID,
+ .name = "Manta Power HAL",
+ .author = "The Android Open Source Project",
+ .methods = &power_module_methods,
},
- init: power_init,
- setInteractive: power_set_interactive,
- powerHint: manta_power_hint,
+ .init = power_init,
+ .setInteractive = power_set_interactive,
+ .powerHint = manta_power_hint,
},
- lock: PTHREAD_MUTEX_INITIALIZER,
- boostpulse_fd: -1,
- boostpulse_warned: 0,
+ .lock = PTHREAD_MUTEX_INITIALIZER,
+ .boostpulse_fd = -1,
+ .boostpulse_warned = 0,
};
diff --git a/voicefx/eS305VoiceProcessing.cpp b/voicefx/eS305VoiceProcessing.cpp
index 9a90685..b59c61f 100644
--- a/voicefx/eS305VoiceProcessing.cpp
+++ b/voicefx/eS305VoiceProcessing.cpp
@@ -1058,13 +1058,13 @@
}
audio_effect_library_t AUDIO_EFFECT_LIBRARY_INFO_SYM = {
- tag : AUDIO_EFFECT_LIBRARY_TAG,
- version : EFFECT_LIBRARY_API_VERSION,
- name : "Audience Voice Preprocessing Library",
- implementor : "The Android Open Source Project",
- create_effect : adnc_create,
- release_effect : adnc_release,
- get_descriptor : adnc_get_descriptor
+ .tag = AUDIO_EFFECT_LIBRARY_TAG,
+ .version = EFFECT_LIBRARY_API_VERSION,
+ .name = "Audience Voice Preprocessing Library",
+ .implementor = "The Android Open Source Project",
+ .create_effect = adnc_create,
+ .release_effect = adnc_release,
+ .get_descriptor = adnc_get_descriptor
};
//-------------------------------------------------------