Clean up initializer warning messages
BUG=none
Change-Id: I2eb24d073385a0bda72f97c0bd7cb4b0d3672165
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
diff --git a/sensors_example/sensors_hal.cpp b/sensors_example/sensors_hal.cpp
index ab0e6ad..5b89e59 100644
--- a/sensors_example/sensors_hal.cpp
+++ b/sensors_example/sensors_hal.cpp
@@ -115,43 +115,43 @@
}
static struct hw_module_methods_t sensors_module_methods = {
- open: open_sensors,
+ .open = open_sensors,
};
static struct sensor_t kSensorList[] = {
- { name: "Broken Accelerometer",
- vendor: "Unknown",
- version: 1,
- handle: SensorContext::AvailableSensors::kAccelerometer,
- type: SENSOR_TYPE_ACCELEROMETER,
- maxRange: static_cast<float>(Accelerometer::kMaxRange),
- resolution: 100.0f,
- power: 0.0f,
- minDelay: 10000,
- fifoReservedEventCount: 0,
- fifoMaxEventCount: 0,
- SENSOR_STRING_TYPE_ACCELEROMETER,
- requiredPermission: "",
- maxDelay: 0,
- flags: SENSOR_FLAG_CONTINUOUS_MODE,
- reserved: {},
+ { .name = "Broken Accelerometer",
+ .vendor = "Unknown",
+ .version = 1,
+ .handle = SensorContext::AvailableSensors::kAccelerometer,
+ .type = SENSOR_TYPE_ACCELEROMETER,
+ .maxRange = static_cast<float>(Accelerometer::kMaxRange),
+ .resolution = 100.0f,
+ .power = 0.0f,
+ .minDelay = 10000,
+ .fifoReservedEventCount = 0,
+ .fifoMaxEventCount = 0,
+ .stringType = SENSOR_STRING_TYPE_ACCELEROMETER,
+ .requiredPermission = "",
+ .maxDelay = 0,
+ .flags = SENSOR_FLAG_CONTINUOUS_MODE,
+ .reserved = {},
},
- { name: "Custom Hour of Day Sensor",
- vendor: "Unknown",
- version: 1,
- handle: SensorContext::AvailableSensors::kCustom,
- type: SENSOR_TYPE_CUSTOM,
- maxRange: 24.0f,
- resolution: 1.0f,
- power: 0.0f,
- minDelay: 1,
- fifoReservedEventCount: 0,
- fifoMaxEventCount: 0,
- SENSOR_STRING_TYPE_CUSTOM,
- requiredPermission: "",
- maxDelay: 0,
- flags: SENSOR_FLAG_CONTINUOUS_MODE,
- reserved: {},
+ { .name = "Custom Hour of Day Sensor",
+ .vendor = "Unknown",
+ .version = 1,
+ .handle = SensorContext::AvailableSensors::kCustom,
+ .type = SENSOR_TYPE_CUSTOM,
+ .maxRange = 24.0f,
+ .resolution = 1.0f,
+ .power = 0.0f,
+ .minDelay = 1,
+ .fifoReservedEventCount = 0,
+ .fifoMaxEventCount = 0,
+ .stringType = SENSOR_STRING_TYPE_CUSTOM,
+ .requiredPermission = "",
+ .maxDelay = 0,
+ .flags = SENSOR_FLAG_CONTINUOUS_MODE,
+ .reserved = {},
},
};
@@ -163,17 +163,17 @@
}
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: "Example Sensor Module",
- author: "Google",
- methods: &sensors_module_methods,
- dso: NULL,
- reserved: {0},
+ .common = {
+ .tag = HARDWARE_MODULE_TAG,
+ .version_major = 1,
+ .version_minor = 0,
+ .id = SENSORS_HARDWARE_MODULE_ID,
+ .name = "Example Sensor Module",
+ .author = "Google",
+ .methods = &sensors_module_methods,
+ .dso = NULL,
+ .reserved = {0},
},
- get_sensors_list: get_sensors_list,
- set_operation_mode: NULL
+ .get_sensors_list = get_sensors_list,
+ .set_operation_mode = NULL
};