summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorDan Albert <danalbert@google.com>2015-06-09 17:35:38 -0700
committerDan Albert <danalbert@google.com>2015-06-10 23:05:53 +0000
commit1102e21b5dd0f79072e826932d0a3e3cb2f8c285 (patch)
tree5052b89114b073c0f809ce8c9791248703ab7fce /media
parent0d07846f0f111bc7afa5a153aa67a12022263a38 (diff)
downloadframeworks_base-1102e21b5dd0f79072e826932d0a3e3cb2f8c285.zip
frameworks_base-1102e21b5dd0f79072e826932d0a3e3cb2f8c285.tar.gz
frameworks_base-1102e21b5dd0f79072e826932d0a3e3cb2f8c285.tar.bz2
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
Diffstat (limited to 'media')
-rw-r--r--media/jni/android_media_ImageWriter.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/media/jni/android_media_ImageWriter.cpp b/media/jni/android_media_ImageWriter.cpp
index 294cd84..634ba64 100644
--- a/media/jni/android_media_ImageWriter.cpp
+++ b/media/jni/android_media_ImageWriter.cpp
@@ -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;
}