summaryrefslogtreecommitdiff
path: root/external/stb
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2017-11-07 21:43:39 -0500
committerTim Foley <tfoleyNV@users.noreply.github.com>2017-11-07 18:43:39 -0800
commite1710807292544775dc6a0eb338af081fb94493e (patch)
treed1982bbf9d6e3ae2275298a2dbed26dea0b62174 /external/stb
parenta5dfa5cd2bfa11fb3d9e84877f8dead1815e9077 (diff)
turn on 'treat warnings as errors' (#266)
Diffstat (limited to 'external/stb')
-rw-r--r--external/stb/stb_image.h26
1 files changed, 13 insertions, 13 deletions
diff --git a/external/stb/stb_image.h b/external/stb/stb_image.h
index ae2ada6a6..651b984eb 100644
--- a/external/stb/stb_image.h
+++ b/external/stb/stb_image.h
@@ -2806,7 +2806,7 @@ static int stbi__process_marker(stbi__jpeg *z, int m)
if (t > 3) return stbi__err("bad DQT table","Corrupt JPEG");
for (i=0; i < 64; ++i)
- z->dequant[t][stbi__jpeg_dezigzag[i]] = sixteen ? stbi__get16be(z->s) : stbi__get8(z->s);
+ z->dequant[t][stbi__jpeg_dezigzag[i]] = (stbi__uint16)(sixteen ? stbi__get16be(z->s) : stbi__get8(z->s));
L -= (sixteen ? 129 : 65);
}
return L==0;
@@ -3611,20 +3611,20 @@ static stbi_uc *load_jpeg_image(stbi__jpeg *z, int *out_x, int *out_y, int *comp
} else if (z->s->img_n == 4) {
if (z->app14_color_transform == 0) { // CMYK
for (i=0; i < z->s->img_x; ++i) {
- stbi_uc k = coutput[3][i];
- out[0] = stbi__blinn_8x8(coutput[0][i], k);
- out[1] = stbi__blinn_8x8(coutput[1][i], k);
- out[2] = stbi__blinn_8x8(coutput[2][i], k);
+ stbi_uc tk = coutput[3][i];
+ out[0] = stbi__blinn_8x8(coutput[0][i], tk);
+ out[1] = stbi__blinn_8x8(coutput[1][i], tk);
+ out[2] = stbi__blinn_8x8(coutput[2][i], tk);
out[3] = 255;
out += n;
}
} else if (z->app14_color_transform == 2) { // YCCK
z->YCbCr_to_RGB_kernel(out, y, coutput[1], coutput[2], z->s->img_x, n);
for (i=0; i < z->s->img_x; ++i) {
- stbi_uc k = coutput[3][i];
- out[0] = stbi__blinn_8x8(255 - out[0], k);
- out[1] = stbi__blinn_8x8(255 - out[1], k);
- out[2] = stbi__blinn_8x8(255 - out[2], k);
+ stbi_uc tk = coutput[3][i];
+ out[0] = stbi__blinn_8x8(255 - out[0], tk);
+ out[1] = stbi__blinn_8x8(255 - out[1], tk);
+ out[2] = stbi__blinn_8x8(255 - out[2], tk);
out += n;
}
} else { // YCbCr + alpha? Ignore the fourth channel for now
@@ -3649,10 +3649,10 @@ static stbi_uc *load_jpeg_image(stbi__jpeg *z, int *out_x, int *out_y, int *comp
}
} else if (z->s->img_n == 4 && z->app14_color_transform == 0) {
for (i=0; i < z->s->img_x; ++i) {
- stbi_uc k = coutput[3][i];
- stbi_uc r = stbi__blinn_8x8(coutput[0][i], k);
- stbi_uc g = stbi__blinn_8x8(coutput[1][i], k);
- stbi_uc b = stbi__blinn_8x8(coutput[2][i], k);
+ stbi_uc tk = coutput[3][i];
+ stbi_uc r = stbi__blinn_8x8(coutput[0][i], tk);
+ stbi_uc g = stbi__blinn_8x8(coutput[1][i], tk);
+ stbi_uc b = stbi__blinn_8x8(coutput[2][i], tk);
out[0] = stbi__compute_y(r, g, b);
out[1] = 255;
out += n;