#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
+#include <stdint.h>
#include <error.h>
#include "auto-brightness-sensorhub.h"
static gboolean lcdon_from_aod_cb(gpointer data)
{
- int level = (int) data;
+ int level = (int)(intptr_t) data;
autobrt_timer = 0;
* heavy loaded time and therefore make it change smoothly. */
if (aod_clock_displayed) {
autobrtlevel = level; /* reserve the level, defer applying */
- autobrt_timer = g_timeout_add(200, lcdon_from_aod_cb, (gpointer)level);
+ autobrt_timer = g_timeout_add(200, lcdon_from_aod_cb, (gpointer)(intptr_t) level);
} else { /* S_NORMAL state or LCDON from usual OFF state, not from AOD */
display_info.set_brightness_level(level);
}
#include <stdbool.h>
+#include <stdint.h>
#include <vconf.h>
#include <hal/device/hal-usb_gadget-interface.h>
_I("USB debug mode is changed to %s.", mode ? "ON" : "OFF");
- device_notify(DEVICE_NOTIFIER_USB_DEBUG_MODE, (void *)mode);
+ device_notify(DEVICE_NOTIFIER_USB_DEBUG_MODE, (void *)(intptr_t) mode);
}
static int usb_debug_mode_changed(void *on)
* debug off + rndis off : USB_FUNCTION_MTP | USB_FUNCTION_ACM
*/
- if ((int)on) {
+ if ((int)(intptr_t) on) {
if (rndis_is_enabled)
new_mode = USB_FUNCTION_ACM | USB_FUNCTION_SDB | USB_FUNCTION_RNDIS;
else