more warning fixes.

sprinkle a few 'const char*'s around to remove warnings 
about discarding qualifiers in imbuf code.
This commit is contained in:
Stephen Swaney 2007-09-03 19:12:36 +00:00
parent 1b35c1c1ec
commit 3326d493a0
7 changed files with 9 additions and 9 deletions

@ -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

@ -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));
}

@ -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);
/**

@ -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

@ -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);

@ -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;

@ -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];