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

Commit 1102e21b authored by Dan Albert's avatar Dan Albert
Browse files

Fix format string mismatch. Clang build fix.

The gralloc usage flags are an enum, which is backed by an
implementation defined type. Both gcc and clang are making this a long
long. All the values are hard coded to fit within 8 hex characters
though, so just make the cast.

Change-Id: I4a9778a24c2cbf7fb663371d208e30c4921e170d
parent 0d07846f
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -293,7 +293,8 @@ static jlong ImageWriter_init(JNIEnv* env, jobject thiz, jobject weakThiz, jobje
        res = native_window_set_usage(anw.get(), GRALLOC_USAGE_SW_WRITE_OFTEN);
        if (res != OK) {
            ALOGE("%s: Configure usage %08x for format %08x failed: %s (%d)",
                    __FUNCTION__, GRALLOC_USAGE_SW_WRITE_OFTEN, format, strerror(-res), res);
                  __FUNCTION__, static_cast<unsigned int>(GRALLOC_USAGE_SW_WRITE_OFTEN),
                  format, strerror(-res), res);
            jniThrowRuntimeException(env, "Failed to SW_WRITE_OFTEN configure usage");
            return 0;
        }