Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6e6e69e8 authored by Mark Salyzyn's avatar Mark Salyzyn Committed by Android (Google) Code Review
Browse files

Merge "healthd: Turn on -Werror"

parents bffba2d9 6f5b47f9
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -7,6 +7,7 @@ LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := healthd_board_default.cpp
LOCAL_MODULE := libhealthd.default
LOCAL_CFLAGS := -Werror
include $(BUILD_STATIC_LIBRARY)

include $(CLEAR_VARS)
@@ -24,7 +25,7 @@ LOCAL_FORCE_STATIC_EXECUTABLE := true
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT_SBIN)
LOCAL_UNSTRIPPED_PATH := $(TARGET_ROOT_OUT_SBIN_UNSTRIPPED)

LOCAL_CFLAGS := -D__STDC_LIMIT_MACROS
LOCAL_CFLAGS := -D__STDC_LIMIT_MACROS -Werror

ifeq ($(strip $(BOARD_CHARGER_DISABLE_INIT_BLANK)),true)
LOCAL_CFLAGS += -DCHARGER_DISABLE_INIT_BLANK
+1 −1
Original line number Diff line number Diff line
@@ -37,7 +37,7 @@
namespace android {

struct sysfsStringEnumMap {
    char* s;
    const char* s;
    int val;
};

+1 −1
Original line number Diff line number Diff line
@@ -76,7 +76,7 @@ status_t BatteryPropertiesRegistrar::getProperty(int id, struct BatteryProperty
    return healthd_get_property(id, val);
}

status_t BatteryPropertiesRegistrar::dump(int fd, const Vector<String16>& args) {
status_t BatteryPropertiesRegistrar::dump(int fd, const Vector<String16>& /*args*/) {
    IPCThreadState* self = IPCThreadState::self();
    const int pid = self->getCallingPid();
    const int uid = self->getCallingUid();
+4 −4
Original line number Diff line number Diff line
@@ -118,7 +118,7 @@ static struct healthd_mode_ops recovery_ops = {
    .battery_update = healthd_mode_nop_battery_update,
};

static void healthd_mode_nop_init(struct healthd_config *config) {
static void healthd_mode_nop_init(struct healthd_config* /*config*/) {
}

static int healthd_mode_nop_preparetowait(void) {
@@ -129,7 +129,7 @@ static void healthd_mode_nop_heartbeat(void) {
}

static void healthd_mode_nop_battery_update(
    struct android::BatteryProperties *props) {
    struct android::BatteryProperties* /*props*/) {
}

int healthd_register_event(int fd, void (*handler)(uint32_t)) {
@@ -205,7 +205,7 @@ static void periodic_chores() {
}

#define UEVENT_MSG_LEN 1024
static void uevent_event(uint32_t epevents) {
static void uevent_event(uint32_t /*epevents*/) {
    char msg[UEVENT_MSG_LEN+2];
    char *cp;
    int n;
@@ -246,7 +246,7 @@ static void uevent_init(void) {
                   "register for uevent events failed\n");
}

static void wakealarm_event(uint32_t epevents) {
static void wakealarm_event(uint32_t /*epevents*/) {
    unsigned long long wakeups;

    if (read(wakealarm_fd, &wakeups, sizeof(wakeups)) == -1) {
+2 −2
Original line number Diff line number Diff line
@@ -42,11 +42,11 @@ int healthd_mode_android_preparetowait(void) {
    return -1;
}

static void binder_event(uint32_t epevents) {
static void binder_event(uint32_t /*epevents*/) {
    IPCThreadState::self()->handlePolledCommands();
}

void healthd_mode_android_init(struct healthd_config *config) {
void healthd_mode_android_init(struct healthd_config* /*config*/) {
    ProcessState::self()->setThreadPoolMaxThreadCount(0);
    IPCThreadState::self()->disableBackgroundScheduling(true);
    IPCThreadState::self()->setupPolling(&gBinderFd);
Loading