From 3326d493a0d9b2b22bfb5c5446fed232bab9d28f Mon Sep 17 00:00:00 2001 From: Stephen Swaney Date: Mon, 3 Sep 2007 19:12:36 +0000 Subject: more warning fixes. sprinkle a few 'const char*'s around to remove warnings about discarding qualifiers in imbuf code. --- source/blender/imbuf/IMB_imbuf.h | 4 ++-- source/blender/imbuf/intern/IMB_jpeg.h | 2 +- source/blender/imbuf/intern/anim.c | 4 ++-- source/blender/imbuf/intern/jpeg.c | 2 +- source/blender/imbuf/intern/readimage.c | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) (limited to 'source/blender/imbuf') diff --git a/source/blender/imbuf/IMB_imbuf.h b/source/blender/imbuf/IMB_imbuf.h index 3e8aaea4f3c..e56fb5a776d 100644 --- a/source/blender/imbuf/IMB_imbuf.h +++ b/source/blender/imbuf/IMB_imbuf.h @@ -158,7 +158,7 @@ struct ImBuf *IMB_testiffname(char *naam,int flags); * * @attention Defined in readimage.c */ -struct ImBuf *IMB_loadiffname(char *naam, int flags); +struct ImBuf *IMB_loadiffname(const char *naam, int flags); /** * @@ -258,7 +258,7 @@ int IMB_anim_get_duration(struct anim *anim); * * @attention Defined in anim.c */ -struct anim * IMB_open_anim(char * name, int ib_flags); +struct anim * IMB_open_anim(const char * name, int ib_flags); void IMB_close_anim(struct anim * anim); /** diff --git a/source/blender/imbuf/intern/IMB_jpeg.h b/source/blender/imbuf/intern/IMB_jpeg.h index 4a86a72ca77..f78810d27ee 100644 --- a/source/blender/imbuf/intern/IMB_jpeg.h +++ b/source/blender/imbuf/intern/IMB_jpeg.h @@ -45,7 +45,7 @@ struct jpeg_compress_struct; int imb_is_a_jpeg(unsigned char *mem); int imb_savejpeg(struct ImBuf * ibuf, char * name, int flags); -struct ImBuf * imb_ibJpegImageFromFilename (char * filename, int flags); +struct ImBuf * imb_ibJpegImageFromFilename (const char * filename, int flags); struct ImBuf * imb_ibJpegImageFromMemory (unsigned char * buffer, int size, int flags); #endif diff --git a/source/blender/imbuf/intern/anim.c b/source/blender/imbuf/intern/anim.c index 24ea79ee90d..5b185a4423f 100644 --- a/source/blender/imbuf/intern/anim.c +++ b/source/blender/imbuf/intern/anim.c @@ -338,12 +338,12 @@ void IMB_close_anim(struct anim * anim) { } -struct anim * IMB_open_anim(char * name, int ib_flags) { +struct anim * IMB_open_anim( const char * name, int ib_flags) { struct anim * anim; anim = (struct anim*)MEM_callocN(sizeof(struct anim), "anim struct"); if (anim != NULL) { - strcpy(anim->name, name); + strcpy(anim->name, name); /* fixme: possible buffer overflow here? */ anim->ib_flags = ib_flags; } return(anim); diff --git a/source/blender/imbuf/intern/jpeg.c b/source/blender/imbuf/intern/jpeg.c index cd90adda27a..1774aa7c156 100644 --- a/source/blender/imbuf/intern/jpeg.c +++ b/source/blender/imbuf/intern/jpeg.c @@ -345,7 +345,7 @@ static ImBuf * ibJpegImageFromCinfo(struct jpeg_decompress_struct * cinfo, int f return(ibuf); } -ImBuf * imb_ibJpegImageFromFilename (char * filename, int flags) +ImBuf * imb_ibJpegImageFromFilename (const char * filename, int flags) { struct jpeg_decompress_struct _cinfo, *cinfo = &_cinfo; struct jpeg_error_mgr jerr; diff --git a/source/blender/imbuf/intern/readimage.c b/source/blender/imbuf/intern/readimage.c index c5901ccad90..ec0f17a8c2b 100644 --- a/source/blender/imbuf/intern/readimage.c +++ b/source/blender/imbuf/intern/readimage.c @@ -268,7 +268,7 @@ struct ImBuf *IMB_loadifffile(int file, int flags) { } -struct ImBuf *IMB_loadiffname(char *naam, int flags) { +struct ImBuf *IMB_loadiffname(const char *naam, int flags) { int file; struct ImBuf *ibuf; int buf[1]; -- cgit v1.2.3