Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2018-01-17 23:11:59 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2018-01-18 02:54:07 +0300
commite0f2c7aff484c7448903a1466829675494ebae6c (patch)
tree4d238fa9baacb37cf243e4a45984ef42dbf63549
parent235f578a0d21191cf4914652e8cfc5608fc1e218 (diff)
Fix Linux/GCC compiler warning in recent fixes.
-rw-r--r--source/blender/imbuf/intern/cineon/logImageCore.c4
-rw-r--r--source/blender/imbuf/intern/iris.c2
-rw-r--r--source/blender/imbuf/intern/radiance_hdr.c9
3 files changed, 7 insertions, 8 deletions
diff --git a/source/blender/imbuf/intern/cineon/logImageCore.c b/source/blender/imbuf/intern/cineon/logImageCore.c
index 376d40a5f6b..bb72f675cb8 100644
--- a/source/blender/imbuf/intern/cineon/logImageCore.c
+++ b/source/blender/imbuf/intern/cineon/logImageCore.c
@@ -701,7 +701,7 @@ static int logImageElementGetData10Packed(LogImageFile *logImage, LogImageElemen
for (size_t y = 0; y < logImage->height; y++) {
/* seek to data */
if (logimage_fseek(logImage, y * rowLength + logElement.dataOffset, SEEK_SET) != 0) {
- if (verbose) printf("DPX/Cineon: Couldn't seek at %u\n", (int)(y * rowLength + logElement.dataOffset));
+ if (verbose) printf("DPX/Cineon: Couldn't seek at %u\n", (unsigned int)(y * rowLength + logElement.dataOffset));
return 1;
}
@@ -779,7 +779,7 @@ static int logImageElementGetData12Packed(LogImageFile *logImage, LogImageElemen
for (size_t y = 0; y < logImage->height; y++) {
/* seek to data */
if (logimage_fseek(logImage, y * rowLength + logElement.dataOffset, SEEK_SET) != 0) {
- if (verbose) printf("DPX/Cineon: Couldn't seek at %u\n", (int)(y * rowLength + logElement.dataOffset));
+ if (verbose) printf("DPX/Cineon: Couldn't seek at %u\n", (unsigned int)(y * rowLength + logElement.dataOffset));
return 1;
}
diff --git a/source/blender/imbuf/intern/iris.c b/source/blender/imbuf/intern/iris.c
index c62829cb8fa..55727ed6697 100644
--- a/source/blender/imbuf/intern/iris.c
+++ b/source/blender/imbuf/intern/iris.c
@@ -261,7 +261,7 @@ struct ImBuf *imb_loadiris(const uchar *mem, size_t size, int flags, char colors
MFileOffset _inf_data = {mem, 0}, *inf = &_inf_data;
IMAGE image;
int bpp, rle, cur, badorder;
- ImBuf *ibuf;
+ ImBuf *ibuf = NULL;
uchar dirty_flag = 0;
if (size < HEADER_SIZE) {
diff --git a/source/blender/imbuf/intern/radiance_hdr.c b/source/blender/imbuf/intern/radiance_hdr.c
index cecebf7bfa3..8d822a314f5 100644
--- a/source/blender/imbuf/intern/radiance_hdr.c
+++ b/source/blender/imbuf/intern/radiance_hdr.c
@@ -138,7 +138,7 @@ static const unsigned char *freadcolrs(RGBE *scan, const unsigned char *mem, int
if (UNLIKELY(code + j > xmax)) {
return NULL;
}
- int val = *mem++;
+ val = *mem++;
while (code--) {
scan[j++][i] = (unsigned char)val;
}
@@ -263,7 +263,7 @@ struct ImBuf *imb_loadhdr(const unsigned char *mem, size_t size, int flags, char
printf("WARNING! HDR decode error, image may be just truncated, or completely wrong...\n");
break;
}
- for (size_t x = 0; x < width; x++) {
+ for (x = 0; x < width; x++) {
/* convert to ldr */
RGBE2FLOAT(sline[x], fcol);
*rect_float++ = fcol[RED];
@@ -302,8 +302,7 @@ static int fwritecolrs(FILE *file, int width, int channels, unsigned char *ibufs
rgbe_scan = (RGBE *)MEM_mallocN(sizeof(RGBE) * width, "radhdr_write_tmpscan");
/* convert scanline */
- size_t j = 0;
- for (size_t i = 0; i < width; i++) {
+ for (size_t i = 0, j = 0; i < width; i++) {
if (fpscan) {
fcol[RED] = fpscan[j];
fcol[GRN] = (channels >= 2) ? fpscan[j + 1] : fpscan[j];
@@ -400,7 +399,7 @@ int imb_savehdr(struct ImBuf *ibuf, const char *name, int flags)
if (ibuf->rect_float)
fp = ibuf->rect_float + ibuf->channels * (height - 1) * width;
- for (size_t y = height - 1; y >= 0; y--) {
+ for (size_t y = 0; y < height; y++) {
if (fwritecolrs(file, width, ibuf->channels, cp, fp) < 0) {
fclose(file);
printf("HDR write error\n");