diff options
author | Bernie Innocenti <codewiz@google.com> | 2019-10-31 10:36:11 -0700 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2019-10-31 10:36:11 -0700 |
commit | fba3002e5d8b085cd409188c54b9efaa73ecd422 (patch) | |
tree | e0ddc6e9d198d691a065821bf3764011116d4cec | |
parent | 8557ec76c6be2f0e5b42ae273b7cf3b223641a9a (diff) | |
parent | f3229053656e57321eaeac81348db697d9f04859 (diff) | |
download | netd-fba3002e5d8b085cd409188c54b9efaa73ecd422.tar.gz |
Merge "Enable pedantic checks for uninitialized variables"
am: f322905365
Change-Id: I3ca2596f259f59dc0fe65b62e590fea3e51171be
-rw-r--r-- | Android.bp | 2 | ||||
-rw-r--r-- | server/ResolvStub.cpp | 2 |
2 files changed, 3 insertions, 1 deletions
@@ -10,6 +10,8 @@ cc_defaults { "-Werror", // Override -Wno-error=implicit-fallthrough from soong "-Werror=implicit-fallthrough", + "-Werror=sometimes-uninitialized", + "-Werror=conditional-uninitialized", "-Wnullable-to-nonnull-conversion", "-Wsign-compare", "-Wthread-safety", diff --git a/server/ResolvStub.cpp b/server/ResolvStub.cpp index d6bcb05a..2fb66254 100644 --- a/server/ResolvStub.cpp +++ b/server/ResolvStub.cpp @@ -55,7 +55,7 @@ static void resolvStubInitFunction(void* handle, const char* symbol, FunctionTyp } int resolv_stub_init() { - void* netdResolvHandle; + void* netdResolvHandle = nullptr; for (const auto& dir : {APEX_LIB64_DIR, APEX_LIB_DIR}) { std::string path = std::string(dir) + "/" + LIBNAME; |