diff options
author | Colin Cross <ccross@android.com> | 2016-12-01 16:56:18 -0800 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2016-12-05 11:16:36 -0800 |
commit | 98125af3c955a25e1ae686d5afc3c47d2e2c4332 (patch) | |
tree | 2126a70978b45392e30be644e2bdc4f3b1a2ca74 | |
parent | d029679dea6e50810ea7abc4199971efe0a8b5e7 (diff) | |
download | libjpeg-turbo-98125af3c955a25e1ae686d5afc3c47d2e2c4332.tar.gz |
Fix sign mismatch comparison warnings
Fixes:
rdppm.c:257:14: warning: comparison of integers of different signs: 'int' and 'unsigned int' [-Wsign-compare]
if (temp > maxval)
~~~~ ^ ~~~~~~
rdppm.c:284:14: warning: comparison of integers of different signs: 'int' and 'unsigned int' [-Wsign-compare]
if (temp > maxval)
~~~~ ^ ~~~~~~
rdppm.c:289:14: warning: comparison of integers of different signs: 'int' and 'unsigned int' [-Wsign-compare]
if (temp > maxval)
~~~~ ^ ~~~~~~
rdppm.c:294:14: warning: comparison of integers of different signs: 'int' and 'unsigned int' [-Wsign-compare]
if (temp > maxval)
(cherry picked from commit d22fd541bf9dd87889c25909e19a640a580bcad7)
Test: mma -j
Change-Id: I8e1e32d490aa89fca9f8c901c00b9f24409520f4
-rw-r--r-- | README.android | 7 | ||||
-rw-r--r-- | rdppm.c | 4 |
2 files changed, 8 insertions, 3 deletions
diff --git a/README.android b/README.android index d7140fe2..0fa01750 100644 --- a/README.android +++ b/README.android @@ -28,4 +28,9 @@ the extra underscore). Fix broken build with NDK platforms < android-21 Cherry picked from upstream: -https://github.com/libjpeg-turbo/libjpeg-turbo/commit/dfefba77520ded5c5fd4864e76352a5f3eb23e74
\ No newline at end of file +https://github.com/libjpeg-turbo/libjpeg-turbo/commit/dfefba77520ded5c5fd4864e76352a5f3eb23e74 + +(4) rdppm.c +Fix sign mismatch comparison warnings +Cherry picked from upstream: +https://github.com/libjpeg-turbo/libjpeg-turbo/commit/d22fd541bf9dd87889c25909e19a640a580bcad7 @@ -251,7 +251,7 @@ get_word_gray_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) ptr = source->pub.buffer[0]; bufferptr = source->iobuffer; for (col = cinfo->image_width; col > 0; col--) { - register int temp; + register unsigned int temp; temp = UCH(*bufferptr++) << 8; temp |= UCH(*bufferptr++); if (temp > maxval) @@ -278,7 +278,7 @@ get_word_rgb_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) ptr = source->pub.buffer[0]; bufferptr = source->iobuffer; for (col = cinfo->image_width; col > 0; col--) { - register int temp; + register unsigned int temp; temp = UCH(*bufferptr++) << 8; temp |= UCH(*bufferptr++); if (temp > maxval) |