diff options
| author | 2016-02-19 13:44:25 -0800 | |
|---|---|---|
| committer | 2016-02-19 13:44:25 -0800 | |
| commit | 1c8cbb54407b9c1d56626de80a796a395012a92c (patch) | |
| tree | 159a34a8b004c1afe0a351e113a000f1d4c3e744 /tests/touchlag/touchlag.cpp | |
| parent | ea168d229d316c84652e88ad0f19adbaa884d731 (diff) | |
Fix a set of random warnings in frameworks/base/
Bug: 26936282
Change-Id: Ic411d7a1673503d5945f952ebf5a8be964bb54a4
Diffstat (limited to 'tests/touchlag/touchlag.cpp')
| -rw-r--r-- | tests/touchlag/touchlag.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/touchlag/touchlag.cpp b/tests/touchlag/touchlag.cpp index df4befb95fb9..9264a254ed24 100644 --- a/tests/touchlag/touchlag.cpp +++ b/tests/touchlag/touchlag.cpp @@ -54,11 +54,11 @@ void clearBuffer(Buffer* buf, uint32_t pixel) { void drawTwoPixels(Buffer* buf, uint32_t pixel, ssize_t x, ssize_t y, size_t w) { if (y>0 && y<ssize_t(buf->h)) { uint32_t* bits = buf->pixels + y * buf->s; - if (x>=0 && x<buf->w) { + if (x>=0 && x<ssize_t(buf->w)) { bits[x] = pixel; } ssize_t W(w); - if ((x+W)>=0 && (x+W)<buf->w) { + if ((x+W)>=0 && (x+W)<ssize_t(buf->w)) { bits[x+W] = pixel; } } @@ -251,13 +251,13 @@ int main(int argc, char** argv) { Queue queue; - int x=0, y=0, down=0; + int x=0, y=0; int lag_x=0, lag_y=0; clearBuffer(&framebuffer, 0); while (true) { uint32_t crt = 0; - int err = ioctl(fd, FBIO_WAITFORVSYNC, &crt); + ioctl(fd, FBIO_WAITFORVSYNC, &crt); // draw beam marker drawRect(&framebuffer, 0x400000, framebuffer.w-2, 0, 2, framebuffer.h); |