diff options
| author | 2017-12-05 10:27:39 -0800 | |
|---|---|---|
| committer | 2017-12-05 10:27:39 -0800 | |
| commit | b2a90b6ba618a3dd53aca11322afc1c045302105 (patch) | |
| tree | da764ccddc997cf81bb7a88089563f0f29cd695a | |
| parent | 5281f56377bebf9932b14cd7f6490117612acfc0 (diff) | |
Use -Werror in frameworks/native/cmds/cmd
* Ignore return value of getfilecon?
Bug: 66996870
Test: build with WITH_TIDY=1
Change-Id: Ic7d67907a1cf0ba415aa0753bbd55bde06c8dd06
Merged-In: I341e6047dbb5b49a92f69df74b073d2f54a7754d
| -rw-r--r-- | cmds/cmd/Android.mk | 2 | ||||
| -rw-r--r-- | cmds/cmd/cmd.cpp | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/cmds/cmd/Android.mk b/cmds/cmd/Android.mk index d565e57f43..4868555b34 100644 --- a/cmds/cmd/Android.mk +++ b/cmds/cmd/Android.mk @@ -10,6 +10,8 @@ LOCAL_SHARED_LIBRARIES := \ libselinux \ libbinder +LOCAL_CFLAGS := -Wall -Werror + LOCAL_C_INCLUDES += \ $(JNI_H_INCLUDE) diff --git a/cmds/cmd/cmd.cpp b/cmds/cmd/cmd.cpp index 014c99593c..022d3dd6ba 100644 --- a/cmds/cmd/cmd.cpp +++ b/cmds/cmd/cmd.cpp @@ -78,7 +78,7 @@ public: if (is_selinux_enabled() && seLinuxContext.size() > 0) { String8 seLinuxContext8(seLinuxContext); security_context_t tmp = NULL; - int ret = getfilecon(fullPath.string(), &tmp); + getfilecon(fullPath.string(), &tmp); Unique_SecurityContext context(tmp); int accessGranted = selinux_check_access(seLinuxContext8.string(), context.get(), "file", "write", NULL); |