summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
Diffstat (limited to 'services')
-rw-r--r--services/sensorservice/CorrectedGyroSensor.cpp2
-rw-r--r--services/sensorservice/GravitySensor.cpp2
-rw-r--r--services/sensorservice/OrientationSensor.cpp2
-rw-r--r--services/sensorservice/RotationVectorSensor.cpp4
-rw-r--r--services/sensorservice/SensorDevice.cpp6
-rw-r--r--services/sensorservice/SensorFusion.cpp2
-rw-r--r--services/sensorservice/SensorInterface.cpp2
-rw-r--r--services/sensorservice/SensorInterface.h6
-rw-r--r--services/sensorservice/SensorService.cpp17
-rw-r--r--services/sensorservice/main_sensorservice.cpp2
-rw-r--r--services/surfaceflinger/Android.mk4
-rw-r--r--services/surfaceflinger/DispSync.cpp2
-rw-r--r--services/surfaceflinger/DisplayDevice.cpp22
-rw-r--r--services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp2
-rw-r--r--services/surfaceflinger/DisplayHardware/HWComposer.cpp11
-rw-r--r--services/surfaceflinger/EventThread.cpp2
-rw-r--r--services/surfaceflinger/FrameTracker.cpp4
-rw-r--r--services/surfaceflinger/MessageQueue.cpp2
-rw-r--r--services/surfaceflinger/RenderEngine/GLES11RenderEngine.cpp2
-rw-r--r--services/surfaceflinger/RenderEngine/Program.cpp4
-rw-r--r--services/surfaceflinger/SurfaceFlinger.cpp17
21 files changed, 63 insertions, 54 deletions
diff --git a/services/sensorservice/CorrectedGyroSensor.cpp b/services/sensorservice/CorrectedGyroSensor.cpp
index 31487a7..b07d544 100644
--- a/services/sensorservice/CorrectedGyroSensor.cpp
+++ b/services/sensorservice/CorrectedGyroSensor.cpp
@@ -61,7 +61,7 @@ status_t CorrectedGyroSensor::activate(void* ident, bool enabled) {
return mSensorFusion.activate(ident, enabled);
}
-status_t CorrectedGyroSensor::setDelay(void* ident, int handle, int64_t ns) {
+status_t CorrectedGyroSensor::setDelay(void* ident, int /*handle*/, int64_t ns) {
mSensorDevice.setDelay(ident, mGyro.getHandle(), ns);
return mSensorFusion.setDelay(ident, ns);
}
diff --git a/services/sensorservice/GravitySensor.cpp b/services/sensorservice/GravitySensor.cpp
index dd1f650..3cb3745 100644
--- a/services/sensorservice/GravitySensor.cpp
+++ b/services/sensorservice/GravitySensor.cpp
@@ -70,7 +70,7 @@ status_t GravitySensor::activate(void* ident, bool enabled) {
return mSensorFusion.activate(ident, enabled);
}
-status_t GravitySensor::setDelay(void* ident, int handle, int64_t ns) {
+status_t GravitySensor::setDelay(void* ident, int /*handle*/, int64_t ns) {
return mSensorFusion.setDelay(ident, ns);
}
diff --git a/services/sensorservice/OrientationSensor.cpp b/services/sensorservice/OrientationSensor.cpp
index 10b391c..6d85cca 100644
--- a/services/sensorservice/OrientationSensor.cpp
+++ b/services/sensorservice/OrientationSensor.cpp
@@ -69,7 +69,7 @@ status_t OrientationSensor::activate(void* ident, bool enabled) {
return mSensorFusion.activate(ident, enabled);
}
-status_t OrientationSensor::setDelay(void* ident, int handle, int64_t ns) {
+status_t OrientationSensor::setDelay(void* ident, int /*handle*/, int64_t ns) {
return mSensorFusion.setDelay(ident, ns);
}
diff --git a/services/sensorservice/RotationVectorSensor.cpp b/services/sensorservice/RotationVectorSensor.cpp
index a2157b4..cb305eb 100644
--- a/services/sensorservice/RotationVectorSensor.cpp
+++ b/services/sensorservice/RotationVectorSensor.cpp
@@ -56,7 +56,7 @@ status_t RotationVectorSensor::activate(void* ident, bool enabled) {
return mSensorFusion.activate(ident, enabled);
}
-status_t RotationVectorSensor::setDelay(void* ident, int handle, int64_t ns) {
+status_t RotationVectorSensor::setDelay(void* ident, int /*handle*/, int64_t ns) {
return mSensorFusion.setDelay(ident, ns);
}
@@ -105,7 +105,7 @@ status_t GyroDriftSensor::activate(void* ident, bool enabled) {
return mSensorFusion.activate(ident, enabled);
}
-status_t GyroDriftSensor::setDelay(void* ident, int handle, int64_t ns) {
+status_t GyroDriftSensor::setDelay(void* ident, int /*handle*/, int64_t ns) {
return mSensorFusion.setDelay(ident, ns);
}
diff --git a/services/sensorservice/SensorDevice.cpp b/services/sensorservice/SensorDevice.cpp
index 19caa5c..3b64f0a 100644
--- a/services/sensorservice/SensorDevice.cpp
+++ b/services/sensorservice/SensorDevice.cpp
@@ -78,7 +78,7 @@ void SensorDevice::dump(String8& result)
Mutex::Autolock _l(mLock);
for (size_t i=0 ; i<size_t(count) ; i++) {
const Info& info = mActivationCount.valueFor(list[i].handle);
- result.appendFormat("handle=0x%08x, active-count=%d, batch_period(ms)={ ", list[i].handle,
+ result.appendFormat("handle=0x%08x, active-count=%zu, batch_period(ms)={ ", list[i].handle,
info.batchParams.size());
for (size_t j = 0; j < info.batchParams.size(); j++) {
BatchParams params = info.batchParams.valueAt(j);
@@ -87,7 +87,7 @@ void SensorDevice::dump(String8& result)
}
result.appendFormat(" }, selected=%4.1f ms\n", info.bestBatchParams.batchDelay / 1e6f);
- result.appendFormat("handle=0x%08x, active-count=%d, batch_timeout(ms)={ ", list[i].handle,
+ result.appendFormat("handle=0x%08x, active-count=%zu, batch_timeout(ms)={ ", list[i].handle,
info.batchParams.size());
for (size_t j = 0; j < info.batchParams.size(); j++) {
BatchParams params = info.batchParams.valueAt(j);
@@ -309,7 +309,7 @@ int SensorDevice::getHalDeviceVersion() const {
return mSensorDevice->common.version;
}
-status_t SensorDevice::flush(void* ident, int handle) {
+status_t SensorDevice::flush(void* /*ident*/, int handle) {
if (getHalDeviceVersion() < SENSORS_DEVICE_API_VERSION_1_1) {
return INVALID_OPERATION;
}
diff --git a/services/sensorservice/SensorFusion.cpp b/services/sensorservice/SensorFusion.cpp
index 8512d6b..6d93009 100644
--- a/services/sensorservice/SensorFusion.cpp
+++ b/services/sensorservice/SensorFusion.cpp
@@ -139,7 +139,7 @@ int32_t SensorFusion::getMinDelay() const {
void SensorFusion::dump(String8& result) {
const Fusion& fusion(mFusion);
- result.appendFormat("9-axis fusion %s (%d clients), gyro-rate=%7.2fHz, "
+ result.appendFormat("9-axis fusion %s (%zd clients), gyro-rate=%7.2fHz, "
"q=< %g, %g, %g, %g > (%g), "
"b=< %g, %g, %g >\n",
mEnabled ? "enabled" : "disabled",
diff --git a/services/sensorservice/SensorInterface.cpp b/services/sensorservice/SensorInterface.cpp
index f1d1663..2bf5e72 100644
--- a/services/sensorservice/SensorInterface.cpp
+++ b/services/sensorservice/SensorInterface.cpp
@@ -50,7 +50,7 @@ status_t HardwareSensor::activate(void* ident, bool enabled) {
return mSensorDevice.activate(ident, mSensor.getHandle(), enabled);
}
-status_t HardwareSensor::batch(void* ident, int handle, int flags,
+status_t HardwareSensor::batch(void* ident, int /*handle*/, int flags,
int64_t samplingPeriodNs, int64_t maxBatchReportLatencyNs) {
return mSensorDevice.batch(ident, mSensor.getHandle(), flags, samplingPeriodNs,
maxBatchReportLatencyNs);
diff --git a/services/sensorservice/SensorInterface.h b/services/sensorservice/SensorInterface.h
index c295e22..3e76377 100644
--- a/services/sensorservice/SensorInterface.h
+++ b/services/sensorservice/SensorInterface.h
@@ -40,7 +40,7 @@ public:
virtual status_t setDelay(void* ident, int handle, int64_t ns) = 0;
// Not all sensors need to support batching.
- virtual status_t batch(void* ident, int handle, int flags, int64_t samplingPeriodNs,
+ virtual status_t batch(void* ident, int handle, int /*flags*/, int64_t samplingPeriodNs,
int64_t maxBatchReportLatencyNs) {
if (maxBatchReportLatencyNs == 0) {
return setDelay(ident, handle, samplingPeriodNs);
@@ -48,13 +48,13 @@ public:
return -EINVAL;
}
- virtual status_t flush(void* ident, int handle) {
+ virtual status_t flush(void* /*ident*/, int /*handle*/) {
return -EINVAL;
}
virtual Sensor getSensor() const = 0;
virtual bool isVirtual() const = 0;
- virtual void autoDisable(void *ident, int handle) { }
+ virtual void autoDisable(void* /*ident*/, int /*handle*/) { }
};
// ---------------------------------------------------------------------------
diff --git a/services/sensorservice/SensorService.cpp b/services/sensorservice/SensorService.cpp
index ca2fdf6..148f404 100644
--- a/services/sensorservice/SensorService.cpp
+++ b/services/sensorservice/SensorService.cpp
@@ -14,8 +14,9 @@
* limitations under the License.
*/
-#include <stdint.h>
+#include <inttypes.h>
#include <math.h>
+#include <stdint.h>
#include <sys/types.h>
#include <cutils/properties.h>
@@ -153,7 +154,7 @@ void SensorService::onFirstRef()
char line[128];
if (fp != NULL && fgets(line, sizeof(line), fp) != NULL) {
line[sizeof(line) - 1] = '\0';
- sscanf(line, "%u", &mSocketBufferSize);
+ sscanf(line, "%zu", &mSocketBufferSize);
if (mSocketBufferSize > MAX_SOCKET_BUFFER_SIZE_BATCHED) {
mSocketBufferSize = MAX_SOCKET_BUFFER_SIZE_BATCHED;
}
@@ -200,7 +201,7 @@ SensorService::~SensorService()
static const String16 sDump("android.permission.DUMP");
-status_t SensorService::dump(int fd, const Vector<String16>& args)
+status_t SensorService::dump(int fd, const Vector<String16>& /*args*/)
{
String8 result;
if (!PermissionCache::checkCallingPermission(sDump)) {
@@ -260,7 +261,7 @@ status_t SensorService::dump(int fd, const Vector<String16>& args)
result.appendFormat( "last=<%f>\n", e.data[0]);
break;
case SENSOR_TYPE_STEP_COUNTER:
- result.appendFormat( "last=<%llu>\n", e.u64.step_counter);
+ result.appendFormat( "last=<%" PRIu64 ">\n", e.u64.step_counter);
break;
default:
// default to 3 values
@@ -276,19 +277,19 @@ status_t SensorService::dump(int fd, const Vector<String16>& args)
result.append("Active sensors:\n");
for (size_t i=0 ; i<mActiveSensors.size() ; i++) {
int handle = mActiveSensors.keyAt(i);
- result.appendFormat("%s (handle=0x%08x, connections=%d)\n",
+ result.appendFormat("%s (handle=0x%08x, connections=%zu)\n",
getSensorName(handle).string(),
handle,
mActiveSensors.valueAt(i)->getNumConnections());
}
- result.appendFormat("%u Max Socket Buffer size\n", mSocketBufferSize);
- result.appendFormat("%d active connections\n", mActiveConnections.size());
+ result.appendFormat("%zu Max Socket Buffer size\n", mSocketBufferSize);
+ result.appendFormat("%zd active connections\n", mActiveConnections.size());
for (size_t i=0 ; i < mActiveConnections.size() ; i++) {
sp<SensorEventConnection> connection(mActiveConnections[i].promote());
if (connection != 0) {
- result.appendFormat("Connection Number: %d \n", i);
+ result.appendFormat("Connection Number: %zu \n", i);
connection->dump(result);
}
}
diff --git a/services/sensorservice/main_sensorservice.cpp b/services/sensorservice/main_sensorservice.cpp
index 303b65f..0a96f42 100644
--- a/services/sensorservice/main_sensorservice.cpp
+++ b/services/sensorservice/main_sensorservice.cpp
@@ -19,7 +19,7 @@
using namespace android;
-int main(int argc, char** argv) {
+int main(int /*argc*/, char** /*argv*/) {
SensorService::publishAndJoinThreadPool();
return 0;
}
diff --git a/services/surfaceflinger/Android.mk b/services/surfaceflinger/Android.mk
index b2bc550..49a017f 100644
--- a/services/surfaceflinger/Android.mk
+++ b/services/surfaceflinger/Android.mk
@@ -120,6 +120,10 @@ LOCAL_SHARED_LIBRARIES := \
LOCAL_MODULE:= surfaceflinger
+ifdef TARGET_32_BIT_SURFACEFLINGER
+LOCAL_32_BIT_ONLY := true
+endif
+
include $(BUILD_EXECUTABLE)
###############################################################
diff --git a/services/surfaceflinger/DispSync.cpp b/services/surfaceflinger/DispSync.cpp
index ce07ab5..602f20a 100644
--- a/services/surfaceflinger/DispSync.cpp
+++ b/services/surfaceflinger/DispSync.cpp
@@ -287,7 +287,7 @@ class ZeroPhaseTracer : public DispSync::Callback {
public:
ZeroPhaseTracer() : mParity(false) {}
- virtual void onDispSyncEvent(nsecs_t when) {
+ virtual void onDispSyncEvent(nsecs_t /*when*/) {
mParity = !mParity;
ATRACE_INT("ZERO_PHASE_VSYNC", mParity ? 1 : 0);
}
diff --git a/services/surfaceflinger/DisplayDevice.cpp b/services/surfaceflinger/DisplayDevice.cpp
index e5ecf07..f9034a6 100644
--- a/services/surfaceflinger/DisplayDevice.cpp
+++ b/services/surfaceflinger/DisplayDevice.cpp
@@ -77,16 +77,6 @@ DisplayDevice::DisplayDevice(
mNativeWindow = new Surface(producer, false);
ANativeWindow* const window = mNativeWindow.get();
- // Make sure that composition can never be stalled by a virtual display
- // consumer that isn't processing buffers fast enough. We have to do this
- // in two places:
- // * Here, in case the display is composed entirely by HWC.
- // * In makeCurrent(), using eglSwapInterval. Some EGL drivers set the
- // window's swap interval in eglMakeCurrent, so they'll override the
- // interval we set here.
- if (mType >= DisplayDevice::DISPLAY_VIRTUAL)
- window->setSwapInterval(window, 0);
-
/*
* Create our display's surface
*/
@@ -101,6 +91,16 @@ DisplayDevice::DisplayDevice(
eglQuerySurface(display, surface, EGL_WIDTH, &mDisplayWidth);
eglQuerySurface(display, surface, EGL_HEIGHT, &mDisplayHeight);
+ // Make sure that composition can never be stalled by a virtual display
+ // consumer that isn't processing buffers fast enough. We have to do this
+ // in two places:
+ // * Here, in case the display is composed entirely by HWC.
+ // * In makeCurrent(), using eglSwapInterval. Some EGL drivers set the
+ // window's swap interval in eglMakeCurrent, so they'll override the
+ // interval we set here.
+ if (mType >= DisplayDevice::DISPLAY_VIRTUAL)
+ window->setSwapInterval(window, 0);
+
mDisplay = display;
mSurface = surface;
mFormat = format;
@@ -462,7 +462,7 @@ void DisplayDevice::dump(String8& result) const {
result.appendFormat(
"+ DisplayDevice: %s\n"
" type=%x, hwcId=%d, layerStack=%u, (%4dx%4d), ANativeWindow=%p, orient=%2d (type=%08x), "
- "flips=%u, isSecure=%d, secureVis=%d, acquired=%d, numLayers=%u\n"
+ "flips=%u, isSecure=%d, secureVis=%d, acquired=%d, numLayers=%zu\n"
" v:[%d,%d,%d,%d], f:[%d,%d,%d,%d], s:[%d,%d,%d,%d],"
"transform:[[%0.3f,%0.3f,%0.3f][%0.3f,%0.3f,%0.3f][%0.3f,%0.3f,%0.3f]]\n",
mDisplayName.string(), mType, mHwcDisplayId,
diff --git a/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp b/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
index 0f34764..086ccf8 100644
--- a/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
+++ b/services/surfaceflinger/DisplayHardware/FramebufferSurface.cpp
@@ -72,7 +72,7 @@ status_t FramebufferSurface::beginFrame(bool mustRecompose) {
return NO_ERROR;
}
-status_t FramebufferSurface::prepareFrame(CompositionType compositionType) {
+status_t FramebufferSurface::prepareFrame(CompositionType /*compositionType*/) {
return NO_ERROR;
}
diff --git a/services/surfaceflinger/DisplayHardware/HWComposer.cpp b/services/surfaceflinger/DisplayHardware/HWComposer.cpp
index 1b652c3..a48582e 100644
--- a/services/surfaceflinger/DisplayHardware/HWComposer.cpp
+++ b/services/surfaceflinger/DisplayHardware/HWComposer.cpp
@@ -16,12 +16,13 @@
#define ATRACE_TAG ATRACE_TAG_GRAPHICS
+#include <inttypes.h>
+#include <math.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
-#include <math.h>
#include <utils/CallStack.h>
#include <utils/Errors.h>
@@ -1022,12 +1023,12 @@ void HWComposer::dump(String8& result) const {
mFlinger->getLayerSortedByZForHwcDisplay(i);
result.appendFormat(
- " Display[%d] : %ux%u, xdpi=%f, ydpi=%f, refresh=%lld\n",
+ " Display[%zd] : %ux%u, xdpi=%f, ydpi=%f, refresh=%" PRId64 "\n",
i, disp.width, disp.height, disp.xdpi, disp.ydpi, disp.refresh);
if (disp.list) {
result.appendFormat(
- " numHwLayers=%u, flags=%08x\n",
+ " numHwLayers=%zu, flags=%08x\n",
disp.list->numHwLayers, disp.list->flags);
result.append(
@@ -1066,7 +1067,7 @@ void HWComposer::dump(String8& result) const {
if (hwcHasApiVersion(mHwc, HWC_DEVICE_API_VERSION_1_3)) {
result.appendFormat(
- " %10s | %08x | %08x | %08x | %02x | %05x | %08x | [%7.1f,%7.1f,%7.1f,%7.1f] | [%5d,%5d,%5d,%5d] %s\n",
+ " %10s | %08" PRIxPTR " | %08x | %08x | %02x | %05x | %08x | [%7.1f,%7.1f,%7.1f,%7.1f] | [%5d,%5d,%5d,%5d] %s\n",
compositionTypeName[type],
intptr_t(l.handle), l.hints, l.flags, l.transform, l.blending, format,
l.sourceCropf.left, l.sourceCropf.top, l.sourceCropf.right, l.sourceCropf.bottom,
@@ -1074,7 +1075,7 @@ void HWComposer::dump(String8& result) const {
name.string());
} else {
result.appendFormat(
- " %10s | %08x | %08x | %08x | %02x | %05x | %08x | [%7d,%7d,%7d,%7d] | [%5d,%5d,%5d,%5d] %s\n",
+ " %10s | %08" PRIxPTR " | %08x | %08x | %02x | %05x | %08x | [%7d,%7d,%7d,%7d] | [%5d,%5d,%5d,%5d] %s\n",
compositionTypeName[type],
intptr_t(l.handle), l.hints, l.flags, l.transform, l.blending, format,
l.sourceCrop.left, l.sourceCrop.top, l.sourceCrop.right, l.sourceCrop.bottom,
diff --git a/services/surfaceflinger/EventThread.cpp b/services/surfaceflinger/EventThread.cpp
index 3528b62..d868f32 100644
--- a/services/surfaceflinger/EventThread.cpp
+++ b/services/surfaceflinger/EventThread.cpp
@@ -328,7 +328,7 @@ void EventThread::dump(String8& result) const {
mDebugVsyncEnabled?"enabled":"disabled");
result.appendFormat(" soft-vsync: %s\n",
mUseSoftwareVSync?"enabled":"disabled");
- result.appendFormat(" numListeners=%u,\n events-delivered: %u\n",
+ result.appendFormat(" numListeners=%zu,\n events-delivered: %u\n",
mDisplayEventConnections.size(),
mVSyncEvent[DisplayDevice::DISPLAY_PRIMARY].vsync.count);
for (size_t i=0 ; i<mDisplayEventConnections.size() ; i++) {
diff --git a/services/surfaceflinger/FrameTracker.cpp b/services/surfaceflinger/FrameTracker.cpp
index d406672..2fb665e 100644
--- a/services/surfaceflinger/FrameTracker.cpp
+++ b/services/surfaceflinger/FrameTracker.cpp
@@ -17,6 +17,8 @@
// This is needed for stdint.h to define INT64_MAX in C++
#define __STDC_LIMIT_MACROS
+#include <inttypes.h>
+
#include <cutils/log.h>
#include <ui/Fence.h>
@@ -211,7 +213,7 @@ void FrameTracker::dump(String8& result) const {
const size_t o = mOffset;
for (size_t i = 1; i < NUM_FRAME_RECORDS; i++) {
const size_t index = (o+i) % NUM_FRAME_RECORDS;
- result.appendFormat("%lld\t%lld\t%lld\n",
+ result.appendFormat("%" PRId64 "\t%" PRId64 "\t%" PRId64 "\n",
mFrameRecords[index].desiredPresentTime,
mFrameRecords[index].actualPresentTime,
mFrameRecords[index].frameReadyTime);
diff --git a/services/surfaceflinger/MessageQueue.cpp b/services/surfaceflinger/MessageQueue.cpp
index cc672b6..1ad86a6 100644
--- a/services/surfaceflinger/MessageQueue.cpp
+++ b/services/surfaceflinger/MessageQueue.cpp
@@ -179,7 +179,7 @@ int MessageQueue::cb_eventReceiver(int fd, int events, void* data) {
return queue->eventReceiver(fd, events);
}
-int MessageQueue::eventReceiver(int fd, int events) {
+int MessageQueue::eventReceiver(int /*fd*/, int /*events*/) {
ssize_t n;
DisplayEventReceiver::Event buffer[8];
while ((n = DisplayEventReceiver::getEvents(mEventTube, buffer, 8)) > 0) {
diff --git a/services/surfaceflinger/RenderEngine/GLES11RenderEngine.cpp b/services/surfaceflinger/RenderEngine/GLES11RenderEngine.cpp
index 521a5d2..cbff320 100644
--- a/services/surfaceflinger/RenderEngine/GLES11RenderEngine.cpp
+++ b/services/surfaceflinger/RenderEngine/GLES11RenderEngine.cpp
@@ -237,7 +237,7 @@ void GLES11RenderEngine::drawMesh(const Mesh& mesh) {
}
}
-void GLES11RenderEngine::beginGroup(const mat4& colorTransform) {
+void GLES11RenderEngine::beginGroup(const mat4& /*colorTransform*/) {
// doesn't do anything in GLES 1.1
}
diff --git a/services/surfaceflinger/RenderEngine/Program.cpp b/services/surfaceflinger/RenderEngine/Program.cpp
index 4a7fb58..0424e0c 100644
--- a/services/surfaceflinger/RenderEngine/Program.cpp
+++ b/services/surfaceflinger/RenderEngine/Program.cpp
@@ -25,7 +25,7 @@
namespace android {
-Program::Program(const ProgramCache::Key& needs, const char* vertex, const char* fragment)
+Program::Program(const ProgramCache::Key& /*needs*/, const char* vertex, const char* fragment)
: mInitialized(false) {
GLuint vertexId = buildShader(vertex, GL_VERTEX_SHADER);
GLuint fragmentId = buildShader(fragment, GL_FRAGMENT_SHADER);
@@ -112,7 +112,7 @@ GLuint Program::buildShader(const char* source, GLenum type) {
return shader;
}
-String8& Program::dumpShader(String8& result, GLenum type) {
+String8& Program::dumpShader(String8& result, GLenum /*type*/) {
GLuint shader = GL_FRAGMENT_SHADER ? mFragmentShader : mVertexShader;
GLint l;
glGetShaderiv(shader, GL_SHADER_SOURCE_LENGTH, &l);
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index 1a9a694..0c2e8cb 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -21,6 +21,7 @@
#include <errno.h>
#include <math.h>
#include <dlfcn.h>
+#include <inttypes.h>
#include <EGL/egl.h>
@@ -429,7 +430,7 @@ void SurfaceFlinger::init() {
// FIXME: currently we don't get blank/unblank requests
// for displays other than the main display, so we always
// assume a connected display is unblanked.
- ALOGD("marking display %d as acquired/unblanked", i);
+ ALOGD("marking display %zu as acquired/unblanked", i);
hw->acquireScreen();
}
mDisplays.add(token, hw);
@@ -1650,7 +1651,7 @@ void SurfaceFlinger::doComposeSurfaces(const sp<const DisplayDevice>& hw, const
case HWC_FRAMEBUFFER_TARGET: {
// this should not happen as the iterator shouldn't
// let us get there.
- ALOGW("HWC_FRAMEBUFFER_TARGET found in hwc list (index=%d)", i);
+ ALOGW("HWC_FRAMEBUFFER_TARGET found in hwc list (index=%zu)", i);
break;
}
}
@@ -2237,7 +2238,7 @@ void SurfaceFlinger::dumpStatsLocked(const Vector<String16>& args, size_t& index
const nsecs_t period =
getHwComposer().getRefreshPeriod(HWC_DISPLAY_PRIMARY);
- result.appendFormat("%lld\n", period);
+ result.appendFormat("%" PRId64 "\n", period);
if (name.isEmpty()) {
mAnimFrameTracker.dump(result);
@@ -2350,7 +2351,7 @@ void SurfaceFlinger::dumpAllLocked(const Vector<String16>& args, size_t& index,
const LayerVector& currentLayers = mCurrentState.layersSortedByZ;
const size_t count = currentLayers.size();
colorizer.bold(result);
- result.appendFormat("Visible layers (count = %d)\n", count);
+ result.appendFormat("Visible layers (count = %zu)\n", count);
colorizer.reset(result);
for (size_t i=0 ; i<count ; i++) {
const sp<Layer>& layer(currentLayers[i]);
@@ -2362,7 +2363,7 @@ void SurfaceFlinger::dumpAllLocked(const Vector<String16>& args, size_t& index,
*/
colorizer.bold(result);
- result.appendFormat("Displays (%d entries)\n", mDisplays.size());
+ result.appendFormat("Displays (%zu entries)\n", mDisplays.size());
colorizer.reset(result);
for (size_t dpy=0 ; dpy<mDisplays.size() ; dpy++) {
const sp<const DisplayDevice>& hw(mDisplays[dpy]);
@@ -2651,7 +2652,7 @@ class GraphicProducerWrapper : public BBinder, public MessageHandler {
looper->sendMessage(this, Message(MSG_API_CALL));
barrier.wait();
}
- return NO_ERROR;
+ return result;
}
/*
@@ -2661,7 +2662,7 @@ class GraphicProducerWrapper : public BBinder, public MessageHandler {
virtual void handleMessage(const Message& message) {
android_atomic_release_load(&memoryBarrier);
if (message.what == MSG_API_CALL) {
- impl->asBinder()->transact(code, data[0], reply);
+ result = impl->asBinder()->transact(code, data[0], reply);
barrier.open();
} else if (message.what == MSG_EXIT) {
exitRequested = true;
@@ -2945,7 +2946,7 @@ void SurfaceFlinger::checkScreenshot(size_t w, size_t s, size_t h, void const* v
const bool visible = (state.layerStack == hw->getLayerStack())
&& (state.z >= minLayerZ && state.z <= maxLayerZ)
&& (layer->isVisible());
- ALOGE("%c index=%d, name=%s, layerStack=%d, z=%d, visible=%d, flags=%x, alpha=%x",
+ ALOGE("%c index=%zu, name=%s, layerStack=%d, z=%d, visible=%d, flags=%x, alpha=%x",
visible ? '+' : '-',
i, layer->getName().string(), state.layerStack, state.z,
layer->isVisible(), state.flags, state.alpha);