Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f463e180 authored by Chih-Hung Hsieh's avatar Chih-Hung Hsieh
Browse files

Use -Werror in frameworks/native/cmds/cmd

* Ignore return value of getfilecon?

Bug: 66996870
Test: build with WITH_TIDY=1
Change-Id: I341e6047dbb5b49a92f69df74b073d2f54a7754d
parent 1eaa1035
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -10,6 +10,8 @@ LOCAL_SHARED_LIBRARIES := \
    libselinux \
	libbinder

LOCAL_CFLAGS := -Wall -Werror

LOCAL_C_INCLUDES += \
    $(JNI_H_INCLUDE)

+1 −1
Original line number Diff line number Diff line
@@ -104,7 +104,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);
            if (checkWrite) {
                int accessGranted = selinux_check_access(seLinuxContext8.string(), context.get(),