Use -Werror in frameworks/native/cmds
* Remove or comment out unused variables/functions. Bug: 66996870 Test: build with WITH_TIDY=1 Change-Id: I15a463eb9a20bc12787c104f671063ceeafaa1cc
This commit is contained in:
parent
c1e25bd59d
commit
734e378a73
10 changed files with 33 additions and 12 deletions
|
@ -3,6 +3,10 @@
|
|||
cc_binary {
|
||||
name: "atrace",
|
||||
srcs: ["atrace.cpp"],
|
||||
cflags: [
|
||||
"-Wall",
|
||||
"-Werror",
|
||||
],
|
||||
|
||||
shared_libs: [
|
||||
"libbinder",
|
||||
|
|
|
@ -216,8 +216,11 @@ static const char* k_traceClockPath =
|
|||
static const char* k_traceBufferSizePath =
|
||||
"buffer_size_kb";
|
||||
|
||||
#if 0
|
||||
// TODO: Re-enable after stabilization
|
||||
static const char* k_traceCmdlineSizePath =
|
||||
"saved_cmdlines_size";
|
||||
#endif
|
||||
|
||||
static const char* k_tracingOverwriteEnablePath =
|
||||
"options/overwrite";
|
||||
|
@ -240,9 +243,6 @@ static const char* k_funcgraphProcPath =
|
|||
static const char* k_funcgraphFlatPath =
|
||||
"options/funcgraph-flat";
|
||||
|
||||
static const char* k_funcgraphDurationPath =
|
||||
"options/funcgraph-duration";
|
||||
|
||||
static const char* k_ftraceFilterPath =
|
||||
"set_ftrace_filter";
|
||||
|
||||
|
@ -431,7 +431,6 @@ static bool clearTrace()
|
|||
static bool setTraceBufferSizeKB(int size)
|
||||
{
|
||||
char str[32] = "1";
|
||||
int len;
|
||||
if (size < 1) {
|
||||
size = 1;
|
||||
}
|
||||
|
@ -439,6 +438,8 @@ static bool setTraceBufferSizeKB(int size)
|
|||
return writeStr(k_traceBufferSizePath, str);
|
||||
}
|
||||
|
||||
#if 0
|
||||
// TODO: Re-enable after stabilization
|
||||
// Set the default size of cmdline hashtable
|
||||
static bool setCmdlineSize()
|
||||
{
|
||||
|
@ -447,6 +448,7 @@ static bool setCmdlineSize()
|
|||
}
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
// Set the clock to the best available option while tracing. Use 'boot' if it's
|
||||
// available; otherwise, use 'mono'. If neither are available use 'global'.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
cc_binary {
|
||||
name: "bugreport",
|
||||
srcs: ["bugreport.cpp"],
|
||||
cflags: ["-Wall"],
|
||||
cflags: ["-Wall", "-Werror"],
|
||||
shared_libs: ["libcutils"],
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ cc_test {
|
|||
test_suites: ["device-tests"],
|
||||
|
||||
srcs: ["dumpsys_test.cpp"],
|
||||
cflags: ["-Wall", "-Werror"],
|
||||
|
||||
shared_libs: [
|
||||
"libbase",
|
||||
|
|
|
@ -3,6 +3,7 @@ cc_test {
|
|||
name: "installd_utils_test",
|
||||
clang: true,
|
||||
srcs: ["installd_utils_test.cpp"],
|
||||
cflags: ["-Wall", "-Werror"],
|
||||
shared_libs: [
|
||||
"libbase",
|
||||
"liblog",
|
||||
|
@ -19,6 +20,7 @@ cc_test {
|
|||
name: "installd_cache_test",
|
||||
clang: true,
|
||||
srcs: ["installd_cache_test.cpp"],
|
||||
cflags: ["-Wall", "-Werror"],
|
||||
shared_libs: [
|
||||
"libbase",
|
||||
"libbinder",
|
||||
|
@ -38,6 +40,7 @@ cc_test {
|
|||
name: "installd_service_test",
|
||||
clang: true,
|
||||
srcs: ["installd_service_test.cpp"],
|
||||
cflags: ["-Wall", "-Werror"],
|
||||
shared_libs: [
|
||||
"libbase",
|
||||
"libbinder",
|
||||
|
|
|
@ -34,6 +34,10 @@ cc_library_shared {
|
|||
"TextTable.cpp",
|
||||
"utils.cpp",
|
||||
],
|
||||
cflags: [
|
||||
"-Wall",
|
||||
"-Werror",
|
||||
],
|
||||
}
|
||||
|
||||
cc_defaults {
|
||||
|
@ -44,7 +48,8 @@ cc_defaults {
|
|||
"libhidltransport",
|
||||
"liblshal",
|
||||
"libutils",
|
||||
]
|
||||
],
|
||||
cflags: ["-Wall", "-Werror"],
|
||||
}
|
||||
|
||||
cc_binary {
|
||||
|
|
|
@ -62,7 +62,6 @@ private:
|
|||
Status parseArgs(const Arg &arg);
|
||||
|
||||
std::string mCommand;
|
||||
Arg mCmdArgs;
|
||||
NullableOStream<std::ostream> mOut;
|
||||
NullableOStream<std::ostream> mErr;
|
||||
|
||||
|
|
|
@ -57,8 +57,7 @@ bool PipeRelay::RelayThread::threadLoop() {
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
PipeRelay::PipeRelay(std::ostream &os)
|
||||
: mOutStream(os),
|
||||
mInitCheck(NO_INIT) {
|
||||
: mInitCheck(NO_INIT) {
|
||||
int res = socketpair(AF_UNIX, SOCK_STREAM, 0 /* protocol */, mFds);
|
||||
|
||||
if (res < 0) {
|
||||
|
|
|
@ -42,7 +42,6 @@ struct PipeRelay {
|
|||
private:
|
||||
struct RelayThread;
|
||||
|
||||
std::ostream &mOutStream;
|
||||
status_t mInitCheck;
|
||||
int mFds[2];
|
||||
sp<RelayThread> mThread;
|
||||
|
|
|
@ -8,7 +8,11 @@ cc_binary {
|
|||
"libbinder",
|
||||
],
|
||||
|
||||
cflags: ["-DXP_UNIX"],
|
||||
cflags: [
|
||||
"-DXP_UNIX",
|
||||
"-Wall",
|
||||
"-Werror",
|
||||
],
|
||||
}
|
||||
|
||||
cc_binary {
|
||||
|
@ -22,5 +26,10 @@ cc_binary {
|
|||
"libbinder",
|
||||
],
|
||||
|
||||
cflags: ["-DXP_UNIX", "-DVENDORSERVICES"],
|
||||
cflags: [
|
||||
"-DXP_UNIX",
|
||||
"-DVENDORSERVICES",
|
||||
"-Wall",
|
||||
"-Werror",
|
||||
],
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue