diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-12-03 20:05:21 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-12-03 20:05:21 +0300 |
commit | 263830f0004481cd4921f03f4242d7c80794b08d (patch) | |
tree | 30b512a06df2e619681ecacf97faee69e46913f8 /source/blender/imbuf/intern | |
parent | 7c86a1a95cbc643fdbbf8c28f0422face8a15a19 (diff) |
Enabled GCC -Wwrite-strings warning for CMake and replaced many 'char's for 'const char's,.
Only one functional change where Transform orientations passed "" to BIF_createTransformOrientation() which could then have the value written into.
Diffstat (limited to 'source/blender/imbuf/intern')
-rw-r--r-- | source/blender/imbuf/intern/anim_movie.c | 2 | ||||
-rw-r--r-- | source/blender/imbuf/intern/cache.c | 20 | ||||
-rw-r--r-- | source/blender/imbuf/intern/openexr/openexr_api.cpp | 2 | ||||
-rw-r--r-- | source/blender/imbuf/intern/openexr/openexr_multi.h | 4 |
4 files changed, 14 insertions, 14 deletions
diff --git a/source/blender/imbuf/intern/anim_movie.c b/source/blender/imbuf/intern/anim_movie.c index 1bf8eb899db..8c241824bdb 100644 --- a/source/blender/imbuf/intern/anim_movie.c +++ b/source/blender/imbuf/intern/anim_movie.c @@ -510,7 +510,7 @@ static ImBuf * avi_fetchibuf (struct anim *anim, int position) { #ifdef WITH_FFMPEG -extern void do_init_ffmpeg(); +extern void do_init_ffmpeg(void); #ifdef FFMPEG_CODEC_IS_POINTER static AVCodecContext* get_codec_from_stream(AVStream* stream) diff --git a/source/blender/imbuf/intern/cache.c b/source/blender/imbuf/intern/cache.c index 5650a4f9b94..ef8cc913459 100644 --- a/source/blender/imbuf/intern/cache.c +++ b/source/blender/imbuf/intern/cache.c @@ -90,34 +90,34 @@ static ImGlobalTileCache GLOBAL_CACHE; /***************************** Hash Functions ********************************/ -static unsigned int imb_global_tile_hash(void *gtile_p) +static unsigned int imb_global_tile_hash(const void *gtile_p) { - ImGlobalTile *gtile= gtile_p; + const ImGlobalTile *gtile= gtile_p; return ((unsigned int)(intptr_t)gtile->ibuf)*769 + gtile->tx*53 + gtile->ty*97; } -static int imb_global_tile_cmp(void *a_p, void *b_p) +static int imb_global_tile_cmp(const void *a_p, const void *b_p) { - ImGlobalTile *a= a_p; - ImGlobalTile *b= b_p; + const ImGlobalTile *a= a_p; + const ImGlobalTile *b= b_p; if(a->ibuf == b->ibuf && a->tx == b->tx && a->ty == b->ty) return 0; else if(a->ibuf < b->ibuf || a->tx < b->tx || a->ty < b->ty) return -1; else return 1; } -static unsigned int imb_thread_tile_hash(void *ttile_p) +static unsigned int imb_thread_tile_hash(const void *ttile_p) { - ImThreadTile *ttile= ttile_p; + const ImThreadTile *ttile= ttile_p; return ((unsigned int)(intptr_t)ttile->ibuf)*769 + ttile->tx*53 + ttile->ty*97; } -static int imb_thread_tile_cmp(void *a_p, void *b_p) +static int imb_thread_tile_cmp(const void *a_p, const void *b_p) { - ImThreadTile *a= a_p; - ImThreadTile *b= b_p; + const ImThreadTile *a= a_p; + const ImThreadTile *b= b_p; if(a->ibuf == b->ibuf && a->tx == b->tx && a->ty == b->ty) return 0; else if(a->ibuf < b->ibuf || a->tx < b->tx || a->ty < b->ty) return -1; diff --git a/source/blender/imbuf/intern/openexr/openexr_api.cpp b/source/blender/imbuf/intern/openexr/openexr_api.cpp index 81ec43c4c10..25afdf95f05 100644 --- a/source/blender/imbuf/intern/openexr/openexr_api.cpp +++ b/source/blender/imbuf/intern/openexr/openexr_api.cpp @@ -552,7 +552,7 @@ int IMB_exr_begin_read(void *handle, const char *filename, int *width, int *heig } /* still clumsy name handling, layers/channels can be ordered as list in list later */ -void IMB_exr_set_channel(void *handle, char *layname, char *passname, int xstride, int ystride, float *rect) +void IMB_exr_set_channel(void *handle, const char *layname, const char *passname, int xstride, int ystride, float *rect) { ExrHandle *data= (ExrHandle *)handle; ExrChannel *echan; diff --git a/source/blender/imbuf/intern/openexr/openexr_multi.h b/source/blender/imbuf/intern/openexr/openexr_multi.h index 4b5a5b648df..6455d636f1a 100644 --- a/source/blender/imbuf/intern/openexr/openexr_multi.h +++ b/source/blender/imbuf/intern/openexr/openexr_multi.h @@ -48,7 +48,7 @@ int IMB_exr_begin_read (void *handle, const char *filename, int *width, int * void IMB_exr_begin_write (void *handle, const char *filename, int width, int height, int compress); void IMB_exrtile_begin_write (void *handle, const char *filename, int mipmap, int width, int height, int tilex, int tiley); -void IMB_exr_set_channel (void *handle, char *layname, char *passname, int xstride, int ystride, float *rect); +void IMB_exr_set_channel (void *handle, const char *layname, const char *passname, int xstride, int ystride, float *rect); void IMB_exr_read_channels (void *handle); void IMB_exr_write_channels (void *handle); @@ -73,7 +73,7 @@ int IMB_exr_begin_read (void *handle, const char *filename, int *width, int * void IMB_exr_begin_write (void *handle, const 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, const 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)handle; (void)layname; (void)channame; (void)xstride; (void)ystride; (void)rect; } +void IMB_exr_set_channel (void *handle, char *layname, const 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)handle; } void IMB_exr_write_channels (void *handle) { (void)handle; } |