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
diff --git a/include/hardware/gralloc1.h b/include/hardware/gralloc1.h
index 58c0e33..a1a2d69 100644
--- a/include/hardware/gralloc1.h
+++ b/include/hardware/gralloc1.h
@@ -290,7 +290,7 @@
static inline int gralloc1_open(const struct hw_module_t* module,
gralloc1_device_t** device) {
return module->methods->open(module, GRALLOC_HARDWARE_MODULE_ID,
- (struct hw_device_t**) device);
+ TO_HW_DEVICE_T_OPEN(device));
}
static inline int gralloc1_close(gralloc1_device_t* device) {