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:
Diffstat (limited to 'source/blender/imbuf/intern')
-rw-r--r--source/blender/imbuf/intern/allocimbuf.c4
-rw-r--r--source/blender/imbuf/intern/anim.c27
-rw-r--r--source/blender/imbuf/intern/bmp.c8
-rw-r--r--source/blender/imbuf/intern/cineon/cineon_dpx.c4
-rw-r--r--source/blender/imbuf/intern/cineon/cineonlib.c4
-rw-r--r--source/blender/imbuf/intern/cineon/dpxlib.c9
-rw-r--r--source/blender/imbuf/intern/dds/dds_api.cpp2
-rw-r--r--source/blender/imbuf/intern/divers.c8
-rw-r--r--source/blender/imbuf/intern/filetype.c2
-rw-r--r--source/blender/imbuf/intern/filter.c2
-rw-r--r--source/blender/imbuf/intern/imbuf_cocoa.m2
-rw-r--r--source/blender/imbuf/intern/iris.c16
-rw-r--r--source/blender/imbuf/intern/jp2.c4
-rw-r--r--source/blender/imbuf/intern/jpeg.c8
-rw-r--r--source/blender/imbuf/intern/openexr/openexr_api.cpp2
-rw-r--r--source/blender/imbuf/intern/openexr/openexr_multi.h25
-rw-r--r--source/blender/imbuf/intern/png.c5
-rw-r--r--source/blender/imbuf/intern/radiance_hdr.c6
-rw-r--r--source/blender/imbuf/intern/scaling.c10
-rw-r--r--source/blender/imbuf/intern/targa.c6
-rw-r--r--source/blender/imbuf/intern/thumbs.c2
-rw-r--r--source/blender/imbuf/intern/thumbs_blend.c4
-rw-r--r--source/blender/imbuf/intern/tiff.c19
23 files changed, 112 insertions, 67 deletions
diff --git a/source/blender/imbuf/intern/allocimbuf.c b/source/blender/imbuf/intern/allocimbuf.c
index e67c319e61a..53828ed8ea8 100644
--- a/source/blender/imbuf/intern/allocimbuf.c
+++ b/source/blender/imbuf/intern/allocimbuf.c
@@ -324,7 +324,7 @@ short imb_addtilesImBuf(ImBuf *ibuf)
return (ibuf->tiles != NULL);
}
-ImBuf *IMB_allocImBuf(unsigned int x, unsigned int y, uchar d, unsigned int flags, uchar bitmap) /* XXX bitmap argument is deprecated */
+ImBuf *IMB_allocImBuf(unsigned int x, unsigned int y, uchar d, unsigned int flags)
{
ImBuf *ibuf;
@@ -384,7 +384,7 @@ ImBuf *IMB_dupImBuf(ImBuf *ibuf1)
y = ibuf1->y;
if(ibuf1->flags & IB_fields) y *= 2;
- ibuf2 = IMB_allocImBuf(x, y, ibuf1->depth, flags, 0);
+ ibuf2 = IMB_allocImBuf(x, y, ibuf1->depth, flags);
if(ibuf2 == NULL) return NULL;
if(flags & IB_rect)
diff --git a/source/blender/imbuf/intern/anim.c b/source/blender/imbuf/intern/anim.c
index 096ed499f85..8df0d69bcfa 100644
--- a/source/blender/imbuf/intern/anim.c
+++ b/source/blender/imbuf/intern/anim.c
@@ -63,6 +63,7 @@
#include "MEM_guardedalloc.h"
#include "DNA_userdef_types.h"
+#include "BKE_utildefines.h"
#include "BKE_global.h"
#include "BKE_depsgraph.h"
@@ -163,7 +164,7 @@ static ImBuf * movie_fetchibuf(struct anim * anim, int position) {
if (anim == 0) return (0);
- ibuf = IMB_allocImBuf(anim->x, anim->y, 24, IB_rect, 0);
+ ibuf = IMB_allocImBuf(anim->x, anim->y, 24, IB_rect);
if ( mvReadFrames(anim->track, position, 1, ibuf->x * ibuf->y *
sizeof(int), ibuf->rect ) != DM_SUCCESS ) {
@@ -214,14 +215,14 @@ int ismovie(char *name) {
#else
-int ismovie(char *name) {
+int ismovie(char *UNUSED(name)) {
return 0;
}
/* never called, just keep the linker happy */
-static int startmovie(struct anim * anim) { return 1; }
-static ImBuf * movie_fetchibuf(struct anim * anim, int position) { return NULL; }
-static void free_anim_movie(struct anim * anim) { ; }
+static int startmovie(struct anim *UNUSED(anim)) { return 1; }
+static ImBuf * movie_fetchibuf(struct anim *UNUSED(anim), int UNUSED(position)) { return NULL; }
+static void free_anim_movie(struct anim *UNUSED(anim)) { ; }
#endif
@@ -483,7 +484,7 @@ static ImBuf * avi_fetchibuf (struct anim *anim, int position) {
#else
if (1) {
#endif
- ibuf = IMB_allocImBuf (anim->x, anim->y, 24, IB_rect, 0);
+ ibuf = IMB_allocImBuf (anim->x, anim->y, 24, IB_rect);
tmp = AVI_read_frame (anim->avi, AVI_FORMAT_RGB32, position,
AVI_get_stream(anim->avi, AVIST_VIDEO, 0));
@@ -809,7 +810,7 @@ static ImBuf * ffmpeg_fetchibuf(struct anim * anim, int position) {
if (anim == 0) return (0);
- ibuf = IMB_allocImBuf(anim->x, anim->y, 32, IB_rect, 0);
+ ibuf = IMB_allocImBuf(anim->x, anim->y, 32, IB_rect);
avpicture_fill((AVPicture*) anim->pFrameRGB,
(unsigned char*) ibuf->rect,
@@ -998,7 +999,7 @@ static ImBuf * redcode_fetchibuf(struct anim * anim, int position) {
}
ibuf = IMB_allocImBuf(raw_frame->width * 2,
- raw_frame->height * 2, 32, IB_rectfloat, 0);
+ raw_frame->height * 2, 32, IB_rectfloat);
redcode_decode_video_float(raw_frame, ibuf->rect_float, 1);
@@ -1050,31 +1051,31 @@ static struct ImBuf * anim_getnew(struct anim * anim) {
break;
case ANIM_MOVIE:
if (startmovie(anim)) return (0);
- ibuf = IMB_allocImBuf (anim->x, anim->y, 24, 0, 0); /* fake */
+ ibuf = IMB_allocImBuf (anim->x, anim->y, 24, 0); /* fake */
break;
case ANIM_AVI:
if (startavi(anim)) {
printf("couldnt start avi\n");
return (0);
}
- ibuf = IMB_allocImBuf (anim->x, anim->y, 24, 0, 0);
+ ibuf = IMB_allocImBuf (anim->x, anim->y, 24, 0);
break;
#ifdef WITH_QUICKTIME
case ANIM_QTIME:
if (startquicktime(anim)) return (0);
- ibuf = IMB_allocImBuf (anim->x, anim->y, 24, 0, 0);
+ ibuf = IMB_allocImBuf (anim->x, anim->y, 24, 0);
break;
#endif
#ifdef WITH_FFMPEG
case ANIM_FFMPEG:
if (startffmpeg(anim)) return (0);
- ibuf = IMB_allocImBuf (anim->x, anim->y, 24, 0, 0);
+ ibuf = IMB_allocImBuf (anim->x, anim->y, 24, 0);
break;
#endif
#ifdef WITH_REDCODE
case ANIM_REDCODE:
if (startredcode(anim)) return (0);
- ibuf = IMB_allocImBuf (8, 8, 32, 0, 0);
+ ibuf = IMB_allocImBuf (8, 8, 32, 0);
break;
#endif
}
diff --git a/source/blender/imbuf/intern/bmp.c b/source/blender/imbuf/intern/bmp.c
index 450b09c923b..10dc23b1ad2 100644
--- a/source/blender/imbuf/intern/bmp.c
+++ b/source/blender/imbuf/intern/bmp.c
@@ -108,6 +108,8 @@ struct ImBuf *imb_bmp_decode(unsigned char *mem, size_t size, int flags)
int x, y, depth, skip, i;
unsigned char *bmp, *rect;
unsigned short col;
+
+ (void)size; /* unused */
if (checkbmp(mem) == 0) return(0);
@@ -129,9 +131,9 @@ struct ImBuf *imb_bmp_decode(unsigned char *mem, size_t size, int flags)
/* printf("skip: %d, x: %d y: %d, depth: %d (%x)\n", skip, x, y,
depth, bmi.biBitCount); */
if (flags & IB_test) {
- ibuf = IMB_allocImBuf(x, y, depth, 0, 0);
+ ibuf = IMB_allocImBuf(x, y, depth, 0);
} else {
- ibuf = IMB_allocImBuf(x, y, depth, IB_rect, 0);
+ ibuf = IMB_allocImBuf(x, y, depth, IB_rect);
bmp = mem + skip;
rect = (unsigned char *) ibuf->rect;
@@ -199,6 +201,8 @@ int imb_savebmp(struct ImBuf *ibuf, char *name, int flags) {
int bytesize, extrabytes, x, y, t, ptr;
uchar *data;
FILE *ofile;
+
+ (void)flags; /* unused */
extrabytes = (4 - ibuf->x*3 % 4) % 4;
bytesize = (ibuf->x * 3 + extrabytes) * ibuf->y;
diff --git a/source/blender/imbuf/intern/cineon/cineon_dpx.c b/source/blender/imbuf/intern/cineon/cineon_dpx.c
index a9b229536cb..7a5a3fb011b 100644
--- a/source/blender/imbuf/intern/cineon/cineon_dpx.c
+++ b/source/blender/imbuf/intern/cineon/cineon_dpx.c
@@ -88,7 +88,7 @@ static struct ImBuf *imb_load_dpx_cineon(unsigned char *mem, int use_cineon, int
return NULL;
}
- ibuf = IMB_allocImBuf(width, height, 32, IB_rectfloat | flags, 0);
+ ibuf = IMB_allocImBuf(width, height, 32, IB_rectfloat | flags);
row = MEM_mallocN(sizeof(unsigned short)*width*depth, "row in cineon_dpx.c");
frow = ibuf->rect_float+width*height*4;
@@ -125,6 +125,8 @@ static int imb_save_dpx_cineon(ImBuf *buf, char *filename, int use_cineon, int f
int i, j;
int index;
float *fline;
+
+ (void)flags; /* unused */
cineon_conversion_parameters(&conversion);
diff --git a/source/blender/imbuf/intern/cineon/cineonlib.c b/source/blender/imbuf/intern/cineon/cineonlib.c
index 9c9156a4dd9..a2a0fae526d 100644
--- a/source/blender/imbuf/intern/cineon/cineonlib.c
+++ b/source/blender/imbuf/intern/cineon/cineonlib.c
@@ -185,6 +185,8 @@ dumpCineonImageInfo(CineonImageInformation* imageInfo) {
static void
fillCineonFormatInfo(CineonFile* cineon, CineonFormatInformation* formatInfo) {
+ (void)cineon; /* unused */
+
formatInfo->interleave = 0;
formatInfo->packing = 5;
formatInfo->signage = 0;
@@ -238,6 +240,8 @@ dumpCineonFormatInfo(CineonFormatInformation* formatInfo) {
static void
fillCineonOriginationInfo(CineonFile* cineon,
CineonOriginationInformation* originInfo, CineonFileInformation* fileInfo) {
+
+ (void)cineon; /* unused */
originInfo->x_offset = htonl(0);
originInfo->y_offset = htonl(0);
diff --git a/source/blender/imbuf/intern/cineon/dpxlib.c b/source/blender/imbuf/intern/cineon/dpxlib.c
index 365d56939ed..ade69b4d7c0 100644
--- a/source/blender/imbuf/intern/cineon/dpxlib.c
+++ b/source/blender/imbuf/intern/cineon/dpxlib.c
@@ -39,6 +39,8 @@
static void
fillDpxChannelInfo(DpxFile* dpx, DpxChannelInformation* chan, int des) {
+ (void)dpx; /* unused */
+
chan->signage = 0;
chan->ref_low_data = htonl(0);
chan->ref_low_quantity = htonf(0.0);
@@ -160,7 +162,12 @@ dumpDpxImageInfo(DpxImageInformation* imageInfo) {
static void
fillDpxOriginationInfo(
- DpxFile* dpx, DpxOriginationInformation* originInfo, DpxFileInformation* fileInfo) {
+ DpxFile* dpx, DpxOriginationInformation* originInfo, DpxFileInformation* fileInfo)
+{
+ /* unused */
+ (void)dpx;
+ (void)originInfo;
+ (void)fileInfo;
}
static void
diff --git a/source/blender/imbuf/intern/dds/dds_api.cpp b/source/blender/imbuf/intern/dds/dds_api.cpp
index 2e224893271..08f60589977 100644
--- a/source/blender/imbuf/intern/dds/dds_api.cpp
+++ b/source/blender/imbuf/intern/dds/dds_api.cpp
@@ -104,7 +104,7 @@ struct ImBuf *imb_load_dds(unsigned char *mem, size_t size, int flags)
// TODO use the image RGB or RGBA tag to determine the bits per pixel
if (dds.hasAlpha()) bits_per_pixel = 32;
else bits_per_pixel = 24;
- ibuf = IMB_allocImBuf(dds.width(), dds.height(), bits_per_pixel, 0, 0);
+ ibuf = IMB_allocImBuf(dds.width(), dds.height(), bits_per_pixel, 0);
if (ibuf == 0) return(0); /* memory allocation failed */
ibuf->ftype = DDS;
diff --git a/source/blender/imbuf/intern/divers.c b/source/blender/imbuf/intern/divers.c
index 7b3a07f10ad..dfe316628f6 100644
--- a/source/blender/imbuf/intern/divers.c
+++ b/source/blender/imbuf/intern/divers.c
@@ -50,8 +50,8 @@ void IMB_de_interlace(struct ImBuf *ibuf)
if (ibuf->rect) {
/* make copies */
- tbuf1 = IMB_allocImBuf(ibuf->x, ibuf->y / 2, 32, IB_rect, 0);
- tbuf2 = IMB_allocImBuf(ibuf->x, ibuf->y / 2, 32, IB_rect, 0);
+ tbuf1 = IMB_allocImBuf(ibuf->x, ibuf->y / 2, 32, IB_rect);
+ tbuf2 = IMB_allocImBuf(ibuf->x, ibuf->y / 2, 32, IB_rect);
ibuf->x *= 2;
IMB_rectcpy(tbuf1, ibuf, 0, 0, 0, 0, ibuf->x, ibuf->y);
@@ -78,8 +78,8 @@ void IMB_interlace(struct ImBuf *ibuf)
if (ibuf->rect) {
/* make copies */
- tbuf1 = IMB_allocImBuf(ibuf->x, ibuf->y / 2, 32, IB_rect, 0);
- tbuf2 = IMB_allocImBuf(ibuf->x, ibuf->y / 2, 32, IB_rect, 0);
+ tbuf1 = IMB_allocImBuf(ibuf->x, ibuf->y / 2, 32, IB_rect);
+ tbuf2 = IMB_allocImBuf(ibuf->x, ibuf->y / 2, 32, IB_rect);
IMB_rectcpy(tbuf1, ibuf, 0, 0, 0, 0, ibuf->x, ibuf->y);
IMB_rectcpy(tbuf2, ibuf, 0, 0, 0, tbuf2->y, ibuf->x, ibuf->y);
diff --git a/source/blender/imbuf/intern/filetype.c b/source/blender/imbuf/intern/filetype.c
index fb5d2f2e4d7..0702fbe3907 100644
--- a/source/blender/imbuf/intern/filetype.c
+++ b/source/blender/imbuf/intern/filetype.c
@@ -45,7 +45,7 @@ static int imb_ftype_default(ImFileType *type, ImBuf *ibuf) { return (ibuf->ftyp
#if defined(__APPLE__) && defined(IMBUF_COCOA)
static int imb_ftype_cocoa(ImFileType *type, ImBuf *ibuf) { return (ibuf->ftype & TIF); }
#endif
-static int imb_ftype_iris(ImFileType *type, ImBuf *ibuf) { return (ibuf->ftype == IMAGIC); }
+static int imb_ftype_iris(ImFileType *type, ImBuf *ibuf) { (void)type; return (ibuf->ftype == IMAGIC); }
#ifdef WITH_QUICKTIME
static int imb_ftype_quicktime(ImFileType *type, ImBuf *ibuf) { return 0; } // XXX
#endif
diff --git a/source/blender/imbuf/intern/filter.c b/source/blender/imbuf/intern/filter.c
index 3cc266e460e..3c2c276b6e4 100644
--- a/source/blender/imbuf/intern/filter.c
+++ b/source/blender/imbuf/intern/filter.c
@@ -380,7 +380,7 @@ void IMB_makemipmap(ImBuf *ibuf, int use_filter)
while(curmap < IB_MIPMAP_LEVELS) {
if(use_filter) {
- ImBuf *nbuf= IMB_allocImBuf(hbuf->x, hbuf->y, 32, IB_rect, 0);
+ ImBuf *nbuf= IMB_allocImBuf(hbuf->x, hbuf->y, 32, IB_rect);
IMB_filterN(nbuf, hbuf);
ibuf->mipmap[curmap] = IMB_onehalf(nbuf);
IMB_freeImBuf(nbuf);
diff --git a/source/blender/imbuf/intern/imbuf_cocoa.m b/source/blender/imbuf/intern/imbuf_cocoa.m
index 02c90c5bd09..9b627612d2a 100644
--- a/source/blender/imbuf/intern/imbuf_cocoa.m
+++ b/source/blender/imbuf/intern/imbuf_cocoa.m
@@ -93,7 +93,7 @@ struct ImBuf *imb_cocoaLoadImage(unsigned char *mem, int size, int flags)
[bitmapImage setSize:bitmapSize];
/* allocate the image buffer */
- ibuf = IMB_allocImBuf(bitmapSize.width, bitmapSize.height, 32/*RGBA*/, 0, 0);
+ ibuf = IMB_allocImBuf(bitmapSize.width, bitmapSize.height, 32/*RGBA*/, 0);
if (!ibuf) {
fprintf(stderr,
"imb_cocoaLoadImage: could not allocate memory for the " \
diff --git a/source/blender/imbuf/intern/iris.c b/source/blender/imbuf/intern/iris.c
index 883de823745..71ba9b06cad 100644
--- a/source/blender/imbuf/intern/iris.c
+++ b/source/blender/imbuf/intern/iris.c
@@ -123,7 +123,8 @@ static int file_offset;
static unsigned short getshort(FILE *inf)
{
unsigned char * buf;
-
+ (void)inf; /* unused */
+
buf = file_data + file_offset;
file_offset += 2;
@@ -133,6 +134,7 @@ static unsigned short getshort(FILE *inf)
static unsigned int getlong(FILE *inf)
{
unsigned char * buf;
+ (void)inf; /* unused */
buf = file_data + file_offset;
file_offset += 4;
@@ -258,6 +260,8 @@ struct ImBuf *imb_loadiris(unsigned char *mem, size_t size, int flags)
int bpp, rle, cur, badorder;
ImBuf * ibuf;
+ (void)size; /* unused */
+
if(!imb_is_a_iris(mem)) return NULL;
/*printf("new iris\n");*/
@@ -283,7 +287,7 @@ struct ImBuf *imb_loadiris(unsigned char *mem, size_t size, int flags)
zsize = image.zsize;
if (flags & IB_test) {
- ibuf = IMB_allocImBuf(image.xsize, image.ysize, 8 * image.zsize, 0, 0);
+ ibuf = IMB_allocImBuf(image.xsize, image.ysize, 8 * image.zsize, 0);
if (ibuf) ibuf->ftype = IMAGIC;
return(ibuf);
}
@@ -315,7 +319,7 @@ struct ImBuf *imb_loadiris(unsigned char *mem, size_t size, int flags)
if (bpp == 1) {
- ibuf = IMB_allocImBuf(xsize, ysize, 8 * zsize, IB_rect, 0);
+ ibuf = IMB_allocImBuf(xsize, ysize, 8 * zsize, IB_rect);
if (ibuf->depth > 32) ibuf->depth = 32;
base = ibuf->rect;
zbase = (unsigned int *)ibuf->zbuf;
@@ -356,7 +360,7 @@ struct ImBuf *imb_loadiris(unsigned char *mem, size_t size, int flags)
} else { /* bpp == 2 */
- ibuf = IMB_allocImBuf(xsize, ysize, 32, (flags & IB_rect)|IB_rectfloat, 0);
+ ibuf = IMB_allocImBuf(xsize, ysize, 32, (flags & IB_rect)|IB_rectfloat);
fbase = ibuf->rect_float;
@@ -399,7 +403,7 @@ struct ImBuf *imb_loadiris(unsigned char *mem, size_t size, int flags)
} else {
if (bpp == 1) {
- ibuf = IMB_allocImBuf(xsize, ysize, 8 * zsize, IB_rect, 0);
+ ibuf = IMB_allocImBuf(xsize, ysize, 8 * zsize, IB_rect);
if (ibuf->depth > 32) ibuf->depth = 32;
base = ibuf->rect;
@@ -424,7 +428,7 @@ struct ImBuf *imb_loadiris(unsigned char *mem, size_t size, int flags)
} else { /* bpp == 2 */
- ibuf = IMB_allocImBuf(xsize, ysize, 32, (flags & IB_rect)|IB_rectfloat, 0);
+ ibuf = IMB_allocImBuf(xsize, ysize, 32, (flags & IB_rect)|IB_rectfloat);
fbase = ibuf->rect_float;
diff --git a/source/blender/imbuf/intern/jp2.c b/source/blender/imbuf/intern/jp2.c
index a70c154014a..0403d0044f5 100644
--- a/source/blender/imbuf/intern/jp2.c
+++ b/source/blender/imbuf/intern/jp2.c
@@ -189,7 +189,7 @@ struct ImBuf *imb_jp2_decode(unsigned char *mem, size_t size, int flags)
float_divs[i]= (1<<image->comps[i].prec)-1;
}
- ibuf= IMB_allocImBuf(w, h, depth, use_float ? IB_rectfloat : IB_rect, 0);
+ ibuf= IMB_allocImBuf(w, h, depth, use_float ? IB_rectfloat : IB_rect);
if (ibuf==NULL) {
if(dinfo)
@@ -670,6 +670,8 @@ int imb_savejp2(struct ImBuf *ibuf, char *name, int flags) {
opj_event_mgr_t event_mgr; /* event manager */
opj_image_t *image = NULL;
+ (void)flags; /* unused */
+
/*
configure the event callbacks (not required)
setting of each callback is optionnal
diff --git a/source/blender/imbuf/intern/jpeg.c b/source/blender/imbuf/intern/jpeg.c
index 0a070646fd5..e7737e68fce 100644
--- a/source/blender/imbuf/intern/jpeg.c
+++ b/source/blender/imbuf/intern/jpeg.c
@@ -132,6 +132,7 @@ typedef my_source_mgr * my_src_ptr;
static void init_source(j_decompress_ptr cinfo)
{
+ (void)cinfo; /* unused */
}
@@ -165,6 +166,7 @@ static void skip_input_data(j_decompress_ptr cinfo, long num_bytes)
static void term_source(j_decompress_ptr cinfo)
{
+ (void)cinfo; /* unused */
}
static void memory_source(j_decompress_ptr cinfo, unsigned char *buffer, size_t size)
@@ -297,9 +299,9 @@ static ImBuf * ibJpegImageFromCinfo(struct jpeg_decompress_struct * cinfo, int f
if (flags & IB_test) {
jpeg_abort_decompress(cinfo);
- ibuf = IMB_allocImBuf(x, y, 8 * depth, 0, 0);
+ ibuf = IMB_allocImBuf(x, y, 8 * depth, 0);
}
- else if ((ibuf = IMB_allocImBuf(x, y, 8 * depth, IB_rect, 0)) == NULL) {
+ else if ((ibuf = IMB_allocImBuf(x, y, 8 * depth, IB_rect)) == NULL) {
jpeg_abort_decompress(cinfo);
}
else {
@@ -699,7 +701,7 @@ static int save_jstjpeg(char * name, struct ImBuf * ibuf)
struct ImBuf * tbuf;
int oldy, returnval;
- tbuf = IMB_allocImBuf(ibuf->x, ibuf->y / 2, 24, IB_rect, 0);
+ tbuf = IMB_allocImBuf(ibuf->x, ibuf->y / 2, 24, IB_rect);
tbuf->ftype = ibuf->ftype;
tbuf->flags = ibuf->flags;
diff --git a/source/blender/imbuf/intern/openexr/openexr_api.cpp b/source/blender/imbuf/intern/openexr/openexr_api.cpp
index 4107f051d73..5b8c5c72802 100644
--- a/source/blender/imbuf/intern/openexr/openexr_api.cpp
+++ b/source/blender/imbuf/intern/openexr/openexr_api.cpp
@@ -975,7 +975,7 @@ struct ImBuf *imb_load_openexr(unsigned char *mem, size_t size, int flags)
}
else {
- ibuf = IMB_allocImBuf(width, height, 32, 0, 0);
+ ibuf = IMB_allocImBuf(width, height, 32, 0);
ibuf->ftype = OPENEXR;
/* openEXR is linear as per EXR spec */
diff --git a/source/blender/imbuf/intern/openexr/openexr_multi.h b/source/blender/imbuf/intern/openexr/openexr_multi.h
index c66abe76289..e96b52e121d 100644
--- a/source/blender/imbuf/intern/openexr/openexr_multi.h
+++ b/source/blender/imbuf/intern/openexr/openexr_multi.h
@@ -67,24 +67,27 @@ void IMB_exr_close (void *handle);
/* ugly... but we only use it on pipeline.c, render module, now */
void * IMB_exr_get_handle (void) {return NULL;}
-void IMB_exr_add_channel (void *handle, const char *layname, const char *channame, int xstride, int ystride, float *rect) {}
+void IMB_exr_add_channel (void *handle, const char *layname, const char *channame, int xstride, int ystride, float *rect) { (void)handle; (void)layname; (void)channame; (void)xstride; (void)ystride; (void)rect; }
-int IMB_exr_begin_read (void *handle, char *filename, int *width, int *height) {return 0;}
-void IMB_exr_begin_write (void *handle, char *filename, int width, int height, int compress) {}
-void IMB_exrtile_begin_write (void *handle, char *filename, int mipmap, int width, int height, int tilex, int tiley) {}
+int IMB_exr_begin_read (void *handle, char *filename, int *width, int *height) { (void)handle; (void)filename; (void)width; (void)height; return 0;}
+void IMB_exr_begin_write (void *handle, char *filename, int width, int height, int compress) { (void)handle; (void)filename; (void)width; (void)height; (void)compress; }
+void IMB_exrtile_begin_write (void *handle, char *filename, int mipmap, int width, int height, int tilex, int tiley) { (void)handle; (void)filename; (void)mipmap; (void)width; (void)height; (void)tilex; (void)tiley; }
-void IMB_exr_set_channel (void *handle, char *layname, char *channame, int xstride, int ystride, float *rect) {}
+void IMB_exr_set_channel (void *handle, char *layname, char *channame, int xstride, int ystride, float *rect) { (void)handle; (void)layname; (void)channame; (void)xstride; (void)ystride; (void)rect; }
-void IMB_exr_read_channels (void *handle) {}
-void IMB_exr_write_channels (void *handle) {}
-void IMB_exrtile_write_channels (void *handle, int partx, int party, int level) {}
-void IMB_exrtile_clear_channels (void *handle) {}
+void IMB_exr_read_channels (void *handle) { (void)handle; }
+void IMB_exr_write_channels (void *handle) { (void)handle; }
+void IMB_exrtile_write_channels (void *handle, int partx, int party, int level) { (void)handle; (void)partx; (void)party; (void)level; }
+void IMB_exrtile_clear_channels (void *handle) { (void)handle; }
void IMB_exr_multilayer_convert (void *handle, void *base,
void * (*addlayer)(void *base, char *str),
- void (*addpass)(void *base, void *lay, char *str, float *rect, int totchan, char *chan_id)) {}
+ void (*addpass)(void *base, void *lay, char *str, float *rect, int totchan, char *chan_id))
+ {
+ (void)handle; (void)base; (void)addlayer; (void)addpass;
+ }
-void IMB_exr_close (void *handle) {}
+void IMB_exr_close (void *handle) { (void)handle; }
#endif
diff --git a/source/blender/imbuf/intern/png.c b/source/blender/imbuf/intern/png.c
index 6b21f20b3fb..b29a4ae0627 100644
--- a/source/blender/imbuf/intern/png.c
+++ b/source/blender/imbuf/intern/png.c
@@ -61,7 +61,8 @@ int imb_is_a_png(unsigned char *mem)
}
static void Flush(png_structp png_ptr)
-{
+{
+ (void)png_ptr;
}
static void WriteData( png_structp png_ptr, png_bytep data, png_size_t length)
@@ -368,7 +369,7 @@ struct ImBuf *imb_loadpng(unsigned char *mem, size_t size, int flags)
longjmp(png_jmpbuf(png_ptr), 1);
}
- ibuf = IMB_allocImBuf(width, height, 8 * bytesperpixel, 0, 0);
+ ibuf = IMB_allocImBuf(width, height, 8 * bytesperpixel, 0);
if (ibuf) {
ibuf->ftype = PNG;
diff --git a/source/blender/imbuf/intern/radiance_hdr.c b/source/blender/imbuf/intern/radiance_hdr.c
index 4064246c866..b356f56ab74 100644
--- a/source/blender/imbuf/intern/radiance_hdr.c
+++ b/source/blender/imbuf/intern/radiance_hdr.c
@@ -202,8 +202,8 @@ struct ImBuf *imb_loadhdr(unsigned char *mem, size_t size, int flags)
ptr = (unsigned char *)strchr((char*)&mem[x+1], '\n');
ptr++;
- if (flags & IB_test) ibuf = IMB_allocImBuf(width, height, 32, 0, 0);
- else ibuf = IMB_allocImBuf(width, height, 32, (flags & IB_rect)|IB_rectfloat, 0);
+ if (flags & IB_test) ibuf = IMB_allocImBuf(width, height, 32, 0);
+ else ibuf = IMB_allocImBuf(width, height, 32, (flags & IB_rect)|IB_rectfloat);
if (ibuf==NULL) return NULL;
ibuf->ftype = RADHDR;
@@ -340,6 +340,8 @@ int imb_savehdr(struct ImBuf *ibuf, char *name, int flags)
int y, width=ibuf->x, height=ibuf->y;
unsigned char *cp= NULL;
+ (void)flags; /* unused */
+
if (file==NULL) return 0;
writeHeader(file, width, height);
diff --git a/source/blender/imbuf/intern/scaling.c b/source/blender/imbuf/intern/scaling.c
index 4fccf5dae41..73dcc0c8ea9 100644
--- a/source/blender/imbuf/intern/scaling.c
+++ b/source/blender/imbuf/intern/scaling.c
@@ -62,7 +62,7 @@ struct ImBuf *IMB_half_x(struct ImBuf *ibuf1)
if (ibuf1->x <= 1) return(IMB_dupImBuf(ibuf1));
- ibuf2 = IMB_allocImBuf((ibuf1->x)/2, ibuf1->y, ibuf1->depth, ibuf1->flags, 0);
+ ibuf2 = IMB_allocImBuf((ibuf1->x)/2, ibuf1->y, ibuf1->depth, ibuf1->flags);
if (ibuf2==NULL) return (0);
_p1 = (uchar *) ibuf1->rect;
@@ -123,7 +123,7 @@ struct ImBuf *IMB_double_fast_x(struct ImBuf *ibuf1)
do_rect= (ibuf1->rect != NULL);
do_float= (ibuf1->rect_float != NULL);
- ibuf2 = IMB_allocImBuf(2 * ibuf1->x , ibuf1->y , ibuf1->depth, ibuf1->flags, 0);
+ ibuf2 = IMB_allocImBuf(2 * ibuf1->x , ibuf1->y , ibuf1->depth, ibuf1->flags);
if (ibuf2==NULL) return (0);
p1 = (int *) ibuf1->rect;
@@ -181,7 +181,7 @@ struct ImBuf *IMB_half_y(struct ImBuf *ibuf1)
do_rect= (ibuf1->rect != NULL);
do_float= (ibuf1->rect_float != NULL);
- ibuf2 = IMB_allocImBuf(ibuf1->x , (ibuf1->y) / 2 , ibuf1->depth, ibuf1->flags, 0);
+ ibuf2 = IMB_allocImBuf(ibuf1->x , (ibuf1->y) / 2 , ibuf1->depth, ibuf1->flags);
if (ibuf2==NULL) return (0);
_p1 = (uchar *) ibuf1->rect;
@@ -249,7 +249,7 @@ struct ImBuf *IMB_double_fast_y(struct ImBuf *ibuf1)
do_rect= (ibuf1->rect != NULL);
do_float= (ibuf1->rect_float != NULL);
- ibuf2 = IMB_allocImBuf(ibuf1->x , 2 * ibuf1->y , ibuf1->depth, ibuf1->flags, 0);
+ ibuf2 = IMB_allocImBuf(ibuf1->x , 2 * ibuf1->y , ibuf1->depth, ibuf1->flags);
if (ibuf2==NULL) return (0);
p1 = (int *) ibuf1->rect;
@@ -303,7 +303,7 @@ struct ImBuf *IMB_onehalf(struct ImBuf *ibuf1)
if (ibuf1->x <= 1) return(IMB_half_y(ibuf1));
if (ibuf1->y <= 1) return(IMB_half_x(ibuf1));
- ibuf2=IMB_allocImBuf((ibuf1->x)/2, (ibuf1->y)/2, ibuf1->depth, ibuf1->flags, 0);
+ ibuf2=IMB_allocImBuf((ibuf1->x)/2, (ibuf1->y)/2, ibuf1->depth, ibuf1->flags);
if (ibuf2==NULL) return (0);
p1f = ibuf1->rect_float;
diff --git a/source/blender/imbuf/intern/targa.c b/source/blender/imbuf/intern/targa.c
index ada1f448bfc..89a69242a46 100644
--- a/source/blender/imbuf/intern/targa.c
+++ b/source/blender/imbuf/intern/targa.c
@@ -238,6 +238,8 @@ int imb_savetarga(struct ImBuf * ibuf, char *name, int flags)
char buf[20];
FILE *fildes;
short ok = 0;
+
+ (void)flags; /* unused */
if (ibuf == 0) return (0);
if (ibuf->rect == 0) return (0);
@@ -537,8 +539,8 @@ struct ImBuf *imb_loadtarga(unsigned char *mem, size_t mem_size, int flags)
if (checktarga(&tga,mem) == 0) return(0);
- if (flags & IB_test) ibuf = IMB_allocImBuf(tga.xsize,tga.ysize,tga.pixsize, 0, 0);
- else ibuf = IMB_allocImBuf(tga.xsize,tga.ysize,(tga.pixsize + 0x7) & ~0x7, IB_rect, 0);
+ if (flags & IB_test) ibuf = IMB_allocImBuf(tga.xsize,tga.ysize,tga.pixsize, 0);
+ else ibuf = IMB_allocImBuf(tga.xsize,tga.ysize,(tga.pixsize + 0x7) & ~0x7, IB_rect);
if (ibuf == 0) return(0);
ibuf->ftype = TGA;
diff --git a/source/blender/imbuf/intern/thumbs.c b/source/blender/imbuf/intern/thumbs.c
index f3415d44ecb..8abc2e89952 100644
--- a/source/blender/imbuf/intern/thumbs.c
+++ b/source/blender/imbuf/intern/thumbs.c
@@ -280,7 +280,7 @@ ImBuf* IMB_thumb_create(const char* path, ThumbSize size, ThumbSource source, Im
return NULL;
}
if (size == THB_FAIL) {
- img = IMB_allocImBuf(1,1,32, IB_rect | IB_metadata, 0);
+ img = IMB_allocImBuf(1,1,32, IB_rect | IB_metadata);
if (!img) return 0;
} else {
if (THB_SOURCE_IMAGE == source || THB_SOURCE_BLEND == source) {
diff --git a/source/blender/imbuf/intern/thumbs_blend.c b/source/blender/imbuf/intern/thumbs_blend.c
index 2fef230f1c2..cd9bf9c7a3a 100644
--- a/source/blender/imbuf/intern/thumbs_blend.c
+++ b/source/blender/imbuf/intern/thumbs_blend.c
@@ -102,7 +102,7 @@ static ImBuf *loadblend_thumb(gzFile gzfile)
return NULL;
/* finally malloc and read the data */
- img= IMB_allocImBuf(size[0], size[1], 32, IB_rect | IB_metadata, 0);
+ img= IMB_allocImBuf(size[0], size[1], 32, IB_rect | IB_metadata);
if(gzread(gzfile, img->rect, bhead[1]) != bhead[1]) {
IMB_freeImBuf(img);
@@ -161,11 +161,11 @@ void IMB_overlayblend_thumb(unsigned int *thumb, int width, int height, float as
{
int x, y;
- int hline, vline;
int stride_x= (margin_r - margin_l) - 2;
for(y=0; y < height; y++) {
for(x=0; x < width; x++, px+=4) {
+ int hline= 0, vline= 0;
if((x > margin_l && x < margin_r) && (y > margin_b && y < margin_t)) {
/* interior. skip */
x += stride_x;
diff --git a/source/blender/imbuf/intern/tiff.c b/source/blender/imbuf/intern/tiff.c
index 5b77c6c7c36..eb5d1f2c039 100644
--- a/source/blender/imbuf/intern/tiff.c
+++ b/source/blender/imbuf/intern/tiff.c
@@ -93,11 +93,18 @@ typedef struct ImbTIFFMemFile {
static void imb_tiff_DummyUnmapProc(thandle_t fd, tdata_t base, toff_t size)
{
+ (void)fd;
+ (void)base;
+ (void)size;
}
static int imb_tiff_DummyMapProc(thandle_t fd, tdata_t* pbase, toff_t* psize)
{
- return (0);
+ (void)fd;
+ (void)pbase;
+ (void)psize;
+
+ return (0);
}
/**
@@ -154,6 +161,10 @@ static tsize_t imb_tiff_ReadProc(thandle_t handle, tdata_t data, tsize_t n)
*/
static tsize_t imb_tiff_WriteProc(thandle_t handle, tdata_t data, tsize_t n)
{
+ (void)handle;
+ (void)data;
+ (void)n;
+
printf("imb_tiff_WriteProc: this function should not be called.\n");
return (-1);
}
@@ -368,7 +379,7 @@ static int imb_read_tiff_pixels(ImBuf *ibuf, TIFF *image, int premul)
ib_flag = IB_rect;
}
- tmpibuf= IMB_allocImBuf(ibuf->x, ibuf->y, ibuf->depth, ib_flag, 0);
+ tmpibuf= IMB_allocImBuf(ibuf->x, ibuf->y, ibuf->depth, ib_flag);
/* simple RGBA image */
if (!(bitspersample == 32 || bitspersample == 16)) {
@@ -497,7 +508,7 @@ ImBuf *imb_loadtiff(unsigned char *mem, size_t size, int flags)
ib_depth = (spp==3)?24:32;
- ibuf = IMB_allocImBuf(width, height, ib_depth, 0, 0);
+ ibuf = IMB_allocImBuf(width, height, ib_depth, 0);
if(ibuf) {
ibuf->ftype = TIF;
}
@@ -533,7 +544,7 @@ ImBuf *imb_loadtiff(unsigned char *mem, size_t size, int flags)
width= (width > 1)? width/2: 1;
height= (height > 1)? height/2: 1;
- hbuf= IMB_allocImBuf(width, height, 32, 0, 0);
+ hbuf= IMB_allocImBuf(width, height, 32, 0);
hbuf->miplevel= level;
hbuf->ftype= ibuf->ftype;
ibuf->mipmap[level-1] = hbuf;