From: Chih-Wei Huang Date: Thu, 15 Oct 2015 16:16:50 +0000 (+0800) Subject: include the header of malloc/free prototypes X-Git-Tag: android-x86-6.0-r1 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=refs%2Ftags%2Fandroid-x86-6.0-r3;p=android-x86%2Fhardware-liblights.git include the header of malloc/free prototypes Fixes building errors of marshmallow-x86 for the 64-bit target. Also fixes the warning of unused parameter 'dev'. --- diff --git a/lights.c b/lights.c index 22896c7..09ab603 100644 --- a/lights.c +++ b/lights.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -90,7 +91,7 @@ static int rgb_to_brightness16(struct light_state_t const* state) return ((77*((color>>16)&0x00ff)) + (150*((color>>8)&0x00ff)) + (29*(color&0x00ff))); } -static int set_light_backlight(struct light_device_t* dev, struct light_state_t const* state) +static int set_light_backlight(struct light_device_t* dev __attribute__ ((__unused__)), struct light_state_t const* state) { int err = 0; int brightness = rgb_to_brightness16(state);