Avoid C-style cast warnings

hardware/libhardware/include was being included with -isystem, which
hides warnings.  Use a macro to convert modules to hw_device_t** to call
the open function that works in C++ and C.

Bug: 32018017
Test: m -j
Change-Id: If68bf15581975f1217fcab366cef7bc784894641
This commit is contained in:
Colin Cross
2016-10-06 16:44:23 -07:00
parent 64cd91274f
commit cc8d9f9fcb
17 changed files with 23 additions and 17 deletions

View File

@@ -783,7 +783,7 @@ typedef struct hwc_composer_device_1 {
static inline int hwc_open_1(const struct hw_module_t* module,
hwc_composer_device_1_t** device) {
return module->methods->open(module,
HWC_HARDWARE_COMPOSER, (struct hw_device_t**)device);
HWC_HARDWARE_COMPOSER, TO_HW_DEVICE_T_OPEN(device));
}
static inline int hwc_close_1(hwc_composer_device_1_t* device) {