From 99f0d9e52bdbe314d77300f883d66e4470d4a5ee Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Thu, 13 Oct 2016 12:46:38 -0700 Subject: Drop -Wno-unused-parameter. The only one left is libedify. Will handle that in a separate CL. Test: mmma bootable/recovery Change-Id: I732a5f85229da90fd767bee2e46c5c95f529c396 --- minadbd/Android.mk | 17 ++++++++++++++++- minadbd/minadbd_services.cpp | 30 +++++++++++++++--------------- 2 files changed, 31 insertions(+), 16 deletions(-) (limited to 'minadbd') diff --git a/minadbd/Android.mk b/minadbd/Android.mk index 8d86fd653..803171d99 100644 --- a/minadbd/Android.mk +++ b/minadbd/Android.mk @@ -1,13 +1,26 @@ # Copyright 2005 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. LOCAL_PATH:= $(call my-dir) minadbd_cflags := \ -Wall -Werror \ - -Wno-unused-parameter \ -Wno-missing-field-initializers \ -DADB_HOST=0 \ +# libadbd (static library) +# =============================== include $(CLEAR_VARS) LOCAL_SRC_FILES := \ @@ -24,6 +37,8 @@ LOCAL_STATIC_LIBRARIES := libcrypto libbase include $(BUILD_STATIC_LIBRARY) +# minadbd_test (native test) +# =============================== include $(CLEAR_VARS) LOCAL_MODULE := minadbd_test diff --git a/minadbd/minadbd_services.cpp b/minadbd/minadbd_services.cpp index 61c06cc0a..9f0f1f87d 100644 --- a/minadbd/minadbd_services.cpp +++ b/minadbd/minadbd_services.cpp @@ -58,20 +58,20 @@ static int create_service_thread(void (*func)(int, const std::string&), const st return s[0]; } -int service_to_fd(const char* name, const atransport* transport) { - int ret = -1; +int service_to_fd(const char* name, const atransport* /* transport */) { + int ret = -1; - if (!strncmp(name, "sideload:", 9)) { - // this exit status causes recovery to print a special error - // message saying to use a newer adb (that supports - // sideload-host). - exit(3); - } else if (!strncmp(name, "sideload-host:", 14)) { - std::string arg(name + 14); - ret = create_service_thread(sideload_host_service, arg); - } - if (ret >= 0) { - close_on_exec(ret); - } - return ret; + if (!strncmp(name, "sideload:", 9)) { + // this exit status causes recovery to print a special error + // message saying to use a newer adb (that supports + // sideload-host). + exit(3); + } else if (!strncmp(name, "sideload-host:", 14)) { + std::string arg(name + 14); + ret = create_service_thread(sideload_host_service, arg); + } + if (ret >= 0) { + close_on_exec(ret); + } + return ret; } -- cgit v1.2.3