diff --git a/source/blender/blenlib/BLI_blenlib.h b/source/blender/blenlib/BLI_blenlib.h index aaa50206ddb..8cc148db343 100644 --- a/source/blender/blenlib/BLI_blenlib.h +++ b/source/blender/blenlib/BLI_blenlib.h @@ -173,7 +173,7 @@ void BLI_clean(char *path); * @param str The string to be duplicated * @retval Returns the duplicated string */ -char* BLI_strdup(char *str); +char* BLI_strdup(const char *str); /** * Duplicates the first @a len bytes of cstring @a str diff --git a/source/blender/blenlib/intern/util.c b/source/blender/blenlib/intern/util.c index 2a47dcc300b..84261b1d00c 100644 --- a/source/blender/blenlib/intern/util.c +++ b/source/blender/blenlib/intern/util.c @@ -633,7 +633,7 @@ char *BLI_strdupn(char *str, int len) { return n; } -char *BLI_strdup(char *str) { +char *BLI_strdup(const char *str) { return BLI_strdupn(str, strlen(str)); } 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];