Android-x86
Fork

  • R/O
  • HTTP
  • SSH
  • HTTPS

hardware-liblights: コミット

hardware/liblights


コミットメタ情報

リビジョンfd2e518ce7f63e699f560460bf65923e25e166a8 (tree)
日時2015-10-16 01:16:50
作者Chih-Wei Huang <cwhuang@linu...>
コミッターChih-Wei Huang

ログメッセージ

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'.

変更サマリ

差分

--- a/lights.c
+++ b/lights.c
@@ -21,6 +21,7 @@
2121 #include <sys/types.h>
2222 #include <dirent.h>
2323 #include <stdint.h>
24+#include <stdlib.h>
2425 #include <string.h>
2526 #include <unistd.h>
2627 #include <errno.h>
@@ -90,7 +91,7 @@ static int rgb_to_brightness16(struct light_state_t const* state)
9091 return ((77*((color>>16)&0x00ff)) + (150*((color>>8)&0x00ff)) + (29*(color&0x00ff)));
9192 }
9293
93-static int set_light_backlight(struct light_device_t* dev, struct light_state_t const* state)
94+static int set_light_backlight(struct light_device_t* dev __attribute__ ((__unused__)), struct light_state_t const* state)
9495 {
9596 int err = 0;
9697 int brightness = rgb_to_brightness16(state);
旧リポジトリブラウザで表示