OSDN Git Service

include the header of malloc/free prototypes marshmallow-x86 nougat-x86 oreo-x86 pie-x86 q-x86 r-x86 s-x86 android-x86-6.0-r1 android-x86-6.0-r2 android-x86-6.0-r3 android-x86-7.1-r1 android-x86-7.1-r2 android-x86-7.1-r3 android-x86-7.1-r4 android-x86-7.1-r5 android-x86-8.1-r1 android-x86-8.1-r2 android-x86-8.1-r3 android-x86-8.1-r4 android-x86-8.1-r5 android-x86-8.1-r6 android-x86-9.0-r1 android-x86-9.0-r2
authorChih-Wei Huang <cwhuang@linux.org.tw>
Thu, 15 Oct 2015 16:16:50 +0000 (00:16 +0800)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Thu, 15 Oct 2015 16:16:50 +0000 (00:16 +0800)
Fixes building errors of marshmallow-x86 for the 64-bit target.

Also fixes the warning of unused parameter 'dev'.

lights.c

index 22896c7..09ab603 100644 (file)
--- a/lights.c
+++ b/lights.c
@@ -21,6 +21,7 @@
 #include <sys/types.h>
 #include <dirent.h>
 #include <stdint.h>
+#include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
 #include <errno.h>
@@ -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);