#include <errno.h>
#include <fcntl.h>
#include <getopt.h>
+#include <inttypes.h>
#include <signal.h>
#include <stdarg.h>
#include <stdbool.h>
static bool setTagsProperty(uint64_t tags)
{
char buf[64];
- snprintf(buf, 64, "%#llx", tags);
+ snprintf(buf, 64, "%#" PRIx64, tags);
if (property_set(k_traceTagsProperty, buf) < 0) {
fprintf(stderr, "error setting trace tags system property\n");
return false;
close(traceFD);
}
-static void handleSignal(int signo)
+static void handleSignal(int /*signo*/)
{
if (!g_nohup) {
g_traceAborted = true;
virtual void tearDown() {
}
- virtual bool compose(GLuint texName, const sp<GLConsumer>& glc) {
+ virtual bool compose(GLuint /*texName*/, const sp<GLConsumer>& /*glc*/) {
return true;
}
protected:
- virtual bool setUp(GLHelper* helper) {
+ virtual bool setUp(GLHelper* /*helper*/) {
return true;
}
static void printShaderSource(const char* const* src) {
for (size_t i = 0; i < MAX_SHADER_LINES && src[i] != NULL; i++) {
- fprintf(stderr, "%3d: %s\n", i+1, src[i]);
+ fprintf(stderr, "%3zu: %s\n", i+1, src[i]);
}
}
uint32_t runHeight = b.runHeights[run];
uint32_t runWidth = b.width * runHeight / b.height;
- printf(" %-*s | %4d x %4d | ", g_BenchmarkNameLen, b.name,
+ printf(" %-*s | %4d x %4d | ", static_cast<int>(g_BenchmarkNameLen), b.name,
runWidth, runHeight);
fflush(stdout);
size_t len = strlen(scenario);
size_t leftPad = (g_BenchmarkNameLen - len) / 2;
size_t rightPad = g_BenchmarkNameLen - len - leftPad;
- printf(" %*s%s%*s | Resolution | Time (ms)\n", leftPad, "",
- "Scenario", rightPad, "");
+ printf(" %*s%s%*s | Resolution | Time (ms)\n",
+ static_cast<int>(leftPad), "",
+ "Scenario", static_cast<int>(rightPad), "");
}
// Run ALL the benchmarks!
** limitations under the License.
*/
+#include <inttypes.h>
#include <sys/capability.h>
#include "installd.h"
#include <diskusage/dirsize.h>
if (stat(pkgdir, &s) < 0) return -1;
if (s.st_uid != 0 || s.st_gid != 0) {
- ALOGE("fixing uid of non-root pkg: %s %lu %lu\n", pkgdir, s.st_uid, s.st_gid);
+ ALOGE("fixing uid of non-root pkg: %s %" PRIu32 " %" PRIu32 "\n", pkgdir, s.st_uid, s.st_gid);
return -1;
}
{
cache->numCollected++;
if ((cache->numCollected%20000) == 0) {
- ALOGI("Collected cache so far: %d directories, %d files",
+ ALOGI("Collected cache so far: %zd directories, %zd files",
cache->numDirs, cache->numFiles);
}
}
int skip = 0;
char path[PATH_MAX];
- ALOGI("Collected cache files: %d directories, %d files",
+ ALOGI("Collected cache files: %zd directories, %zd files",
cache->numDirs, cache->numFiles);
CACHE_NOISY(ALOGI("Sorting files..."));
return 0;
}
-int FramebufferNativeWindow::lockBuffer_DEPRECATED(ANativeWindow* window,
- ANativeWindowBuffer* buffer)
+int FramebufferNativeWindow::lockBuffer_DEPRECATED(ANativeWindow* /*window*/,
+ ANativeWindowBuffer* /*buffer*/)
{
return NO_ERROR;
}
return BAD_VALUE;
}
-int FramebufferNativeWindow::perform(ANativeWindow* window,
+int FramebufferNativeWindow::perform(ANativeWindow* /*window*/,
int operation, ...)
{
switch (operation) {
#define LOG_TAG "Region"
+#include <inttypes.h>
#include <limits.h>
#include <utils/Log.h>
size_t SIZE = 256;
char buffer[SIZE];
- snprintf(buffer, SIZE, " Region %s (this=%p, count=%d)\n",
+ snprintf(buffer, SIZE, " Region %s (this=%p, count=%" PRIdPTR ")\n",
what, this, tail-head);
out.append(buffer);
while (head != tail) {
(void)flags;
const_iterator head = begin();
const_iterator const tail = end();
- ALOGD(" Region %s (this=%p, count=%d)\n", what, this, tail-head);
+ ALOGD(" Region %s (this=%p, count=%" PRIdPTR ")\n", what, this, tail-head);
while (head != tail) {
ALOGD(" [%3d, %3d, %3d, %3d]\n",
head->left, head->top, head->right, head->bottom);
KeyedVector<GLuint, gl::buffer_t*> mBuffers;
};
-void EGLBufferObjectManager::incStrong(const void* id) const {
+void EGLBufferObjectManager::incStrong(const void* /*id*/) const {
android_atomic_inc(&mCount);
}
-void EGLBufferObjectManager::decStrong(const void* id) const {
+void EGLBufferObjectManager::decStrong(const void* /*id*/) const {
if (android_atomic_dec(&mCount) == 1) {
delete this;
}
}
}
+#if VC_CACHE_STATISTICS
void vertex_cache_t::dump_stats(GLenum mode)
{
-#if VC_CACHE_STATISTICS
nsecs_t time = systemTime(SYSTEM_TIME_THREAD) - startTime;
uint32_t hits = total - misses;
uint32_t prim_count;
total, hits, misses, (hits*100)/total,
prim_count, int(ns2us(time)), int(prim_count*float(seconds(1))/time),
float(misses) / prim_count);
-#endif
}
+#else
+void vertex_cache_t::dump_stats(GLenum /*mode*/)
+{
+}
+#endif
// ----------------------------------------------------------------------------
#if 0
return EGL_BUFFER_PRESERVED;
}
EGLBoolean egl_surface_t::setSwapRectangle(
- EGLint l, EGLint t, EGLint w, EGLint h)
+ EGLint /*l*/, EGLint /*t*/, EGLint /*w*/, EGLint /*h*/)
{
return EGL_FALSE;
}
static bool mask(GLint reqValue, GLint confValue) {
return (confValue & reqValue) == reqValue;
}
- static bool ignore(GLint reqValue, GLint confValue) {
+ static bool ignore(GLint /*reqValue*/, GLint /*confValue*/) {
return true;
}
};
return 0;
}
-static EGLBoolean getConfigAttrib(EGLDisplay dpy, EGLConfig config,
+static EGLBoolean getConfigAttrib(EGLDisplay /*dpy*/, EGLConfig config,
EGLint attribute, EGLint *value)
{
size_t numConfigs = NELEM(gConfigs);
}
static EGLSurface createWindowSurface(EGLDisplay dpy, EGLConfig config,
- NativeWindowType window, const EGLint *attrib_list)
+ NativeWindowType window, const EGLint* /*attrib_list*/)
{
if (egl_display_t::is_valid(dpy) == EGL_FALSE)
return setError(EGL_BAD_DISPLAY, EGL_NO_SURFACE);
}
static EGLSurface createPixmapSurface(EGLDisplay dpy, EGLConfig config,
- NativePixmapType pixmap, const EGLint *attrib_list)
+ NativePixmapType pixmap, const EGLint* /*attrib_list*/)
{
if (egl_display_t::is_valid(dpy) == EGL_FALSE)
return setError(EGL_BAD_DISPLAY, EGL_NO_SURFACE);
}
EGLContext eglCreateContext(EGLDisplay dpy, EGLConfig config,
- EGLContext share_list, const EGLint *attrib_list)
+ EGLContext /*share_list*/, const EGLint* /*attrib_list*/)
{
if (egl_display_t::is_valid(dpy) == EGL_FALSE)
return setError(EGL_BAD_DISPLAY, EGL_NO_SURFACE);
return EGL_TRUE;
}
-EGLBoolean eglWaitNative(EGLint engine)
+EGLBoolean eglWaitNative(EGLint /*engine*/)
{
return EGL_TRUE;
}
return EGL_TRUE;
}
-EGLBoolean eglCopyBuffers( EGLDisplay dpy, EGLSurface surface,
- NativePixmapType target)
+EGLBoolean eglCopyBuffers( EGLDisplay dpy, EGLSurface /*surface*/,
+ NativePixmapType /*target*/)
{
if (egl_display_t::is_valid(dpy) == EGL_FALSE)
return setError(EGL_BAD_DISPLAY, EGL_FALSE);
// ----------------------------------------------------------------------------
EGLBoolean eglSurfaceAttrib(
- EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value)
+ EGLDisplay dpy, EGLSurface /*surface*/, EGLint /*attribute*/, EGLint /*value*/)
{
if (egl_display_t::is_valid(dpy) == EGL_FALSE)
return setError(EGL_BAD_DISPLAY, EGL_FALSE);
}
EGLBoolean eglBindTexImage(
- EGLDisplay dpy, EGLSurface surface, EGLint buffer)
+ EGLDisplay dpy, EGLSurface /*surface*/, EGLint /*buffer*/)
{
if (egl_display_t::is_valid(dpy) == EGL_FALSE)
return setError(EGL_BAD_DISPLAY, EGL_FALSE);
}
EGLBoolean eglReleaseTexImage(
- EGLDisplay dpy, EGLSurface surface, EGLint buffer)
+ EGLDisplay dpy, EGLSurface /*surface*/, EGLint /*buffer*/)
{
if (egl_display_t::is_valid(dpy) == EGL_FALSE)
return setError(EGL_BAD_DISPLAY, EGL_FALSE);
return setError(EGL_BAD_PARAMETER, EGL_FALSE);
}
-EGLBoolean eglSwapInterval(EGLDisplay dpy, EGLint interval)
+EGLBoolean eglSwapInterval(EGLDisplay dpy, EGLint /*interval*/)
{
if (egl_display_t::is_valid(dpy) == EGL_FALSE)
return setError(EGL_BAD_DISPLAY, EGL_FALSE);
}
EGLSurface eglCreatePbufferFromClientBuffer(
- EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer,
- EGLConfig config, const EGLint *attrib_list)
+ EGLDisplay dpy, EGLenum /*buftype*/, EGLClientBuffer /*buffer*/,
+ EGLConfig /*config*/, const EGLint* /*attrib_list*/)
{
if (egl_display_t::is_valid(dpy) == EGL_FALSE)
return setError(EGL_BAD_DISPLAY, EGL_NO_SURFACE);
return NULL;
}
-EGLBoolean eglLockSurfaceKHR(EGLDisplay dpy, EGLSurface surface,
- const EGLint *attrib_list)
+EGLBoolean eglLockSurfaceKHR(EGLDisplay /*dpy*/, EGLSurface /*surface*/,
+ const EGLint* /*attrib_list*/)
{
EGLBoolean result = EGL_FALSE;
return result;
}
-EGLBoolean eglUnlockSurfaceKHR(EGLDisplay dpy, EGLSurface surface)
+EGLBoolean eglUnlockSurfaceKHR(EGLDisplay /*dpy*/, EGLSurface /*surface*/)
{
EGLBoolean result = EGL_FALSE;
return result;
}
EGLImageKHR eglCreateImageKHR(EGLDisplay dpy, EGLContext ctx, EGLenum target,
- EGLClientBuffer buffer, const EGLint *attrib_list)
+ EGLClientBuffer buffer, const EGLint* /*attrib_list*/)
{
if (egl_display_t::is_valid(dpy) == EGL_FALSE) {
return setError(EGL_BAD_DISPLAY, EGL_NO_IMAGE_KHR);
return FENCE_SYNC_HANDLE;
}
-EGLBoolean eglDestroySyncKHR(EGLDisplay dpy, EGLSyncKHR sync)
+EGLBoolean eglDestroySyncKHR(EGLDisplay /*dpy*/, EGLSyncKHR sync)
{
if (sync != FENCE_SYNC_HANDLE) {
return setError(EGL_BAD_PARAMETER, EGL_FALSE);
return EGL_TRUE;
}
-EGLint eglClientWaitSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags,
- EGLTimeKHR timeout)
+EGLint eglClientWaitSyncKHR(EGLDisplay /*dpy*/, EGLSyncKHR sync, EGLint /*flags*/,
+ EGLTimeKHR /*timeout*/)
{
if (sync != FENCE_SYNC_HANDLE) {
return setError(EGL_BAD_PARAMETER, EGL_FALSE);
return EGL_CONDITION_SATISFIED_KHR;
}
-EGLBoolean eglGetSyncAttribKHR(EGLDisplay dpy, EGLSyncKHR sync,
+EGLBoolean eglGetSyncAttribKHR(EGLDisplay /*dpy*/, EGLSyncKHR sync,
EGLint attribute, EGLint *value)
{
if (sync != FENCE_SYNC_HANDLE) {
c->lighting.shadeModel = GL_SMOOTH;
}
-void ogles_uninit_light(ogles_context_t* c)
+void ogles_uninit_light(ogles_context_t* /*c*/)
{
}
invalidate_lighting(c);
}
-void lightVertexNop(ogles_context_t*, vertex_t* v)
+void lightVertexNop(ogles_context_t*, vertex_t* /*v*/)
{
// we should never end-up here
}
}
static void lightTriangleDarkFlat(ogles_context_t* c,
- vertex_t* v0, vertex_t* v1, vertex_t* v2)
+ vertex_t* /*v0*/, vertex_t* /*v1*/, vertex_t* v2)
{
if (!(v2->flags & vertex_t::LIT)) {
v2->flags |= vertex_t::LIT;
}
static void lightTriangleFlat(ogles_context_t* c,
- vertex_t* v0, vertex_t* v1, vertex_t* v2)
+ vertex_t* /*v0*/, vertex_t* /*v1*/, vertex_t* v2)
{
if (!(v2->flags & vertex_t::LIT))
c->lighting.lightVertex(c, v2);
#pragma mark Triangle
#endif
-void primitive_nop_triangle(ogles_context_t* c,
- vertex_t* v0, vertex_t* v1, vertex_t* v2) {
+void primitive_nop_triangle(ogles_context_t* /*c*/,
+ vertex_t* /*v0*/, vertex_t* /*v1*/, vertex_t* /*v2*/) {
}
void primitive_clip_triangle(ogles_context_t* c,
static inline
-bool cull_triangle(ogles_context_t* c, vertex_t* v0, vertex_t* v1, vertex_t* v2)
+bool cull_triangle(ogles_context_t* c, vertex_t* /*v0*/, vertex_t* /*v1*/, vertex_t* /*v2*/)
{
if (ggl_likely(c->cull.enable)) {
const GLenum winding = (c->lerp.area() > 0) ? GL_CW : GL_CCW;
#endif
// These ones are super-easy, we're not supporting those features!
-void glSampleCoverage(GLclampf value, GLboolean invert) {
+void glSampleCoverage(GLclampf /*value*/, GLboolean /*invert*/) {
}
-void glSampleCoveragex(GLclampx value, GLboolean invert) {
+void glSampleCoveragex(GLclampx /*value*/, GLboolean /*invert*/) {
}
-void glStencilFunc(GLenum func, GLint ref, GLuint mask) {
+void glStencilFunc(GLenum func, GLint /*ref*/, GLuint /*mask*/) {
ogles_context_t* c = ogles_context_t::get();
if (func < GL_NEVER || func > GL_ALWAYS) {
ogles_error(c, GL_INVALID_ENUM);
// ----------------------------------------------------------------------------
void glCompressedTexSubImage2D(
- GLenum target, GLint level, GLint xoffset,
- GLint yoffset, GLsizei width, GLsizei height,
- GLenum format, GLsizei imageSize,
- const GLvoid *data)
+ GLenum /*target*/, GLint /*level*/, GLint /*xoffset*/,
+ GLint /*yoffset*/, GLsizei /*width*/, GLsizei /*height*/,
+ GLenum /*format*/, GLsizei /*imageSize*/,
+ const GLvoid* /*data*/)
{
ogles_context_t* c = ogles_context_t::get();
ogles_error(c, GL_INVALID_ENUM);
c->currentNormal.z = 0x10000;
}
-void ogles_uninit_vertex(ogles_context_t* c)
+void ogles_uninit_vertex(ogles_context_t* /*c*/)
{
}
}
EGLBoolean egl_display_t::makeCurrent(egl_context_t* c, egl_context_t* cur_c,
- EGLSurface draw, EGLSurface read, EGLContext ctx,
+ EGLSurface draw, EGLSurface read, EGLContext /*ctx*/,
EGLSurface impl_draw, EGLSurface impl_read, EGLContext impl_ctx)
{
EGLBoolean result;
}
void glColorPointerBounds(GLint size, GLenum type, GLsizei stride,
- const GLvoid *ptr, GLsizei count) {
+ const GLvoid *ptr, GLsizei /*count*/) {
glColorPointer(size, type, stride, ptr);
}
void glNormalPointerBounds(GLenum type, GLsizei stride,
- const GLvoid *pointer, GLsizei count) {
+ const GLvoid *pointer, GLsizei /*count*/) {
glNormalPointer(type, stride, pointer);
}
void glTexCoordPointerBounds(GLint size, GLenum type,
- GLsizei stride, const GLvoid *pointer, GLsizei count) {
+ GLsizei stride, const GLvoid *pointer, GLsizei /*count*/) {
glTexCoordPointer(size, type, stride, pointer);
}
void glVertexPointerBounds(GLint size, GLenum type,
- GLsizei stride, const GLvoid *pointer, GLsizei count) {
+ GLsizei stride, const GLvoid *pointer, GLsizei /*count*/) {
glVertexPointer(size, type, stride, pointer);
}
void GL_APIENTRY glPointSizePointerOESBounds(GLenum type,
- GLsizei stride, const GLvoid *pointer, GLsizei count) {
+ GLsizei stride, const GLvoid *pointer, GLsizei /*count*/) {
glPointSizePointerOES(type, stride, pointer);
}
GL_API void GL_APIENTRY glMatrixIndexPointerOESBounds(GLint size, GLenum type,
- GLsizei stride, const GLvoid *pointer, GLsizei count) {
+ GLsizei stride, const GLvoid *pointer, GLsizei /*count*/) {
glMatrixIndexPointerOES(size, type, stride, pointer);
}
GL_API void GL_APIENTRY glWeightPointerOESBounds(GLint size, GLenum type,
- GLsizei stride, const GLvoid *pointer, GLsizei count) {
+ GLsizei stride, const GLvoid *pointer, GLsizei /*count*/) {
glWeightPointerOES(size, type, stride, pointer);
}
glContext->traceGLMessage(&glmessage);
}
-void GLTrace_eglSwapBuffers(void *dpy, void *draw) {
+void GLTrace_eglSwapBuffers(void* /*dpy*/, void* /*draw*/) {
GLMessage glmessage;
GLTraceContext *glContext = getGLTraceContext();
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
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;
}
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",
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);
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);
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*/) { }
};
// ---------------------------------------------------------------------------
* limitations under the License.
*/
-#include <stdint.h>
+#include <inttypes.h>
#include <math.h>
+#include <stdint.h>
#include <sys/types.h>
#include <cutils/properties.h>
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;
}
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)) {
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
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);
}
}
using namespace android;
-int main(int argc, char** argv) {
+int main(int /*argc*/, char** /*argv*/) {
SensorService::publishAndJoinThreadPool();
return 0;
}
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);
}
return NO_ERROR;
}
-status_t FramebufferSurface::prepareFrame(CompositionType compositionType) {
+status_t FramebufferSurface::prepareFrame(CompositionType /*compositionType*/) {
return NO_ERROR;
}
#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>
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(
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,
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,
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) {
}
}
-void GLES11RenderEngine::beginGroup(const mat4& colorTransform) {
+void GLES11RenderEngine::beginGroup(const mat4& /*colorTransform*/) {
// doesn't do anything in GLES 1.1
}
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);
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);