Merge "Use -Werror in hardware/libhardware"
This commit is contained in:
commit
d1a2b9f7c1
15 changed files with 18 additions and 13 deletions
|
@ -29,7 +29,11 @@ cc_library_shared {
|
|||
"libdl",
|
||||
"libvndksupport",
|
||||
],
|
||||
cflags: ["-DQEMU_HARDWARE"],
|
||||
cflags: [
|
||||
"-DQEMU_HARDWARE",
|
||||
"-Wall",
|
||||
"-Werror",
|
||||
],
|
||||
|
||||
header_libs: ["libhardware_headers"],
|
||||
export_header_lib_headers: ["libhardware_headers"],
|
||||
|
|
|
@ -17,6 +17,7 @@ cc_library_shared {
|
|||
relative_install_path: "hw",
|
||||
proprietary: true,
|
||||
srcs: ["consumerir.c"],
|
||||
cflags: ["-Wall", "-Werror"],
|
||||
header_libs: ["libhardware_headers"],
|
||||
shared_libs: [
|
||||
"liblog",
|
||||
|
|
|
@ -17,6 +17,7 @@ cc_library_shared {
|
|||
relative_install_path: "hw",
|
||||
proprietary: true,
|
||||
srcs: ["fingerprint.c"],
|
||||
cflags: ["-Wall", "-Werror"],
|
||||
header_libs: ["libhardware_headers"],
|
||||
shared_libs: ["liblog"],
|
||||
}
|
||||
|
|
|
@ -26,6 +26,7 @@ cc_library_shared {
|
|||
relative_install_path: "hw",
|
||||
proprietary: true,
|
||||
srcs: ["local_time_hw.c"],
|
||||
cflags: ["-Wall", "-Werror"],
|
||||
header_libs: ["libhardware_headers"],
|
||||
shared_libs: [
|
||||
"liblog",
|
||||
|
|
|
@ -72,8 +72,6 @@ static int ltdev_open(const hw_module_t* module, const char* name,
|
|||
hw_device_t** device)
|
||||
{
|
||||
struct stub_local_time_device *ltdev;
|
||||
struct timespec ts;
|
||||
int ret;
|
||||
|
||||
if (strcmp(name, LOCAL_TIME_HARDWARE_INTERFACE) != 0)
|
||||
return -EINVAL;
|
||||
|
|
|
@ -21,4 +21,5 @@ cc_library_shared {
|
|||
"liblog",
|
||||
"libcutils",
|
||||
],
|
||||
cflags: ["-Wall", "-Werror"],
|
||||
}
|
||||
|
|
|
@ -17,6 +17,7 @@ cc_library_shared {
|
|||
relative_install_path: "hw",
|
||||
proprietary: true,
|
||||
srcs: ["nfc_pn544_example.c"],
|
||||
cflags: ["-Wall", "-Werror"],
|
||||
header_libs: ["libhardware_headers"],
|
||||
shared_libs: [
|
||||
"liblog",
|
||||
|
|
|
@ -17,6 +17,7 @@ cc_library_shared {
|
|||
relative_install_path: "hw",
|
||||
proprietary: true,
|
||||
srcs: ["power.c"],
|
||||
cflags: ["-Wall", "-Werror"],
|
||||
header_libs: [
|
||||
"libhardware_headers",
|
||||
"libutils_headers",
|
||||
|
|
|
@ -12,4 +12,5 @@ cc_library_static {
|
|||
"libdl"
|
||||
],
|
||||
export_include_dirs: ["."],
|
||||
cflags: ["-Wall", "-Werror"],
|
||||
}
|
||||
|
|
|
@ -515,6 +515,7 @@ static int device__close(struct hw_device_t *dev) {
|
|||
if (ctx != NULL) {
|
||||
int retval = ctx->close();
|
||||
delete ctx;
|
||||
return retval;
|
||||
}
|
||||
|
||||
if (sub_hw_modules != nullptr) {
|
||||
|
@ -586,15 +587,6 @@ static int device__config_direct_report(struct sensors_poll_device_1 *dev,
|
|||
static int open_sensors(const struct hw_module_t* module, const char* name,
|
||||
struct hw_device_t** device);
|
||||
|
||||
static bool starts_with(const char* s, const char* prefix) {
|
||||
if (s == NULL || prefix == NULL) {
|
||||
return false;
|
||||
}
|
||||
size_t s_size = strlen(s);
|
||||
size_t prefix_size = strlen(prefix);
|
||||
return s_size >= prefix_size && strncmp(s, prefix, prefix_size) == 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Adds valid paths from the config file to the vector passed in.
|
||||
* The vector must not be null.
|
||||
|
|
|
@ -22,4 +22,5 @@ cc_library_shared {
|
|||
"liblog",
|
||||
],
|
||||
srcs: ["tv_input.cpp"],
|
||||
cflags: ["-Wall", "-Werror"],
|
||||
}
|
||||
|
|
|
@ -21,5 +21,6 @@ cc_library_shared {
|
|||
proprietary: true,
|
||||
header_libs: ["libhardware_headers"],
|
||||
srcs: ["vibrator.c"],
|
||||
cflags: ["-Wall", "-Werror"],
|
||||
shared_libs: ["liblog"],
|
||||
}
|
||||
|
|
|
@ -108,7 +108,6 @@ static int write_led_file(const char *file, const char *value)
|
|||
|
||||
static bool vibra_led_exists()
|
||||
{
|
||||
int fd;
|
||||
char file_str[50];
|
||||
|
||||
snprintf(file_str, sizeof(file_str), "%s/%s", LED_DEVICE, "activate");
|
||||
|
|
|
@ -9,6 +9,7 @@ cc_test {
|
|||
|
||||
cflags: [
|
||||
"-Wall",
|
||||
"-Werror",
|
||||
"-Wextra",
|
||||
],
|
||||
}
|
||||
|
|
|
@ -3,6 +3,8 @@ cc_binary {
|
|||
|
||||
srcs: ["nusensors.cpp"],
|
||||
|
||||
cflags: ["-Wall", "-Werror"],
|
||||
|
||||
shared_libs: [
|
||||
"libcutils",
|
||||
"libhardware",
|
||||
|
|
Loading…
Reference in a new issue