From cd972535027a73ba70069051fe9038b6a8b5696a Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 3 Dec 2010 12:30:59 +0000 Subject: - added GCC warning -Wstrict-prototypes - fixed bug in paste material, exposed by stricter warnings. - removed/renamed various shadowed vars. - removed BGE lamp.colour, only allow lamp.color attribute. --- source/blender/blenkernel/BKE_icons.h | 4 ++-- source/blender/blenkernel/BKE_sequencer.h | 8 +++---- source/blender/blenkernel/BKE_sketch.h | 4 ++-- source/blender/blenkernel/BKE_sound.h | 4 ++-- source/blender/blenkernel/BKE_suggestions.h | 18 +++++++-------- source/blender/blenkernel/intern/cloth.c | 2 +- source/blender/blenkernel/intern/constraint.c | 2 +- source/blender/blenkernel/intern/fmodifier.c | 2 +- source/blender/blenkernel/intern/icons.c | 2 +- source/blender/blenkernel/intern/implicit.c | 2 +- source/blender/blenkernel/intern/material.c | 2 +- source/blender/blenkernel/intern/seqeffects.c | 26 +++++++++++----------- source/blender/blenkernel/intern/softbody.c | 6 ++--- source/blender/blenkernel/intern/suggestions.c | 4 ++-- source/blender/blenkernel/intern/text.c | 2 +- .../blender/blenkernel/intern/writeframeserver.c | 8 +++---- 16 files changed, 48 insertions(+), 48 deletions(-) (limited to 'source/blender/blenkernel') diff --git a/source/blender/blenkernel/BKE_icons.h b/source/blender/blenkernel/BKE_icons.h index 252191803f2..42cbd22d9f1 100644 --- a/source/blender/blenkernel/BKE_icons.h +++ b/source/blender/blenkernel/BKE_icons.h @@ -68,7 +68,7 @@ void BKE_icon_delete(struct ID* id); void BKE_icon_changed(int icon_id); /* free all icons */ -void BKE_icons_free(); +void BKE_icons_free(void); /* free the preview image */ void BKE_previewimg_free(struct PreviewImage **prv); @@ -77,7 +77,7 @@ void BKE_previewimg_free(struct PreviewImage **prv); void BKE_previewimg_free_id(ID *id); /* create a new preview image */ -struct PreviewImage* BKE_previewimg_create() ; +struct PreviewImage* BKE_previewimg_create(void) ; /* create a copy of the preview image */ struct PreviewImage* BKE_previewimg_copy(struct PreviewImage *prv); diff --git a/source/blender/blenkernel/BKE_sequencer.h b/source/blender/blenkernel/BKE_sequencer.h index 1a9fb2d7404..e3b6ebd1ff8 100644 --- a/source/blender/blenkernel/BKE_sequencer.h +++ b/source/blender/blenkernel/BKE_sequencer.h @@ -113,7 +113,7 @@ struct SeqEffectHandle { /* number of input strips needed (called directly after construction) */ - int (*num_inputs)(); + int (*num_inputs)(void); /* load is called first time after readblenfile in get_sequence_effect automatically */ @@ -208,10 +208,10 @@ typedef enum { SEQ_STRIPELEM_IBUF_ENDSTILL } seq_stripelem_ibuf_t; -void seq_stripelem_cache_init(); -void seq_stripelem_cache_destruct(); +void seq_stripelem_cache_init(void); +void seq_stripelem_cache_destruct(void); -void seq_stripelem_cache_cleanup(); +void seq_stripelem_cache_cleanup(void); struct ImBuf * seq_stripelem_cache_get( SeqRenderData context, struct Sequence * seq, diff --git a/source/blender/blenkernel/BKE_sketch.h b/source/blender/blenkernel/BKE_sketch.h index c46604f09f0..a59464bb7ba 100644 --- a/source/blender/blenkernel/BKE_sketch.h +++ b/source/blender/blenkernel/BKE_sketch.h @@ -113,12 +113,12 @@ typedef struct SK_Gesture { /************************************************/ void freeSketch(SK_Sketch *sketch); -SK_Sketch* createSketch(); +SK_Sketch* createSketch(void); void sk_removeStroke(SK_Sketch *sketch, SK_Stroke *stk); void sk_freeStroke(SK_Stroke *stk); -SK_Stroke* sk_createStroke(); +SK_Stroke* sk_createStroke(void); SK_Point *sk_lastStrokePoint(SK_Stroke *stk); diff --git a/source/blender/blenkernel/BKE_sound.h b/source/blender/blenkernel/BKE_sound.h index fb1a3c43006..2d4ea812f57 100644 --- a/source/blender/blenkernel/BKE_sound.h +++ b/source/blender/blenkernel/BKE_sound.h @@ -38,11 +38,11 @@ struct ListBase; struct Main; struct Sequence; -void sound_init_once(); +void sound_init_once(void); void sound_init(struct Main *main); -void sound_exit(); +void sound_exit(void); void sound_force_device(int device); int sound_define_from_str(char *str); diff --git a/source/blender/blenkernel/BKE_suggestions.h b/source/blender/blenkernel/BKE_suggestions.h index 59369d6ac14..9eb8897e0e0 100644 --- a/source/blender/blenkernel/BKE_suggestions.h +++ b/source/blender/blenkernel/BKE_suggestions.h @@ -64,27 +64,27 @@ typedef struct SuggList { } SuggList; /* Free all text tool memory */ -void free_texttools(); +void free_texttools(void); /* Used to identify which Text object the current tools should appear against */ void texttool_text_set_active(Text *text); -void texttool_text_clear(); +void texttool_text_clear(void); short texttool_text_is_active(Text *text); /* Suggestions */ void texttool_suggest_add(const char *name, char type); void texttool_suggest_prefix(const char *prefix); -void texttool_suggest_clear(); -SuggItem *texttool_suggest_first(); -SuggItem *texttool_suggest_last(); +void texttool_suggest_clear(void); +SuggItem *texttool_suggest_first(void); +SuggItem *texttool_suggest_last(void); void texttool_suggest_select(SuggItem *sel); -SuggItem *texttool_suggest_selected(); -int *texttool_suggest_top(); +SuggItem *texttool_suggest_selected(void); +int *texttool_suggest_top(void); /* Documentation */ void texttool_docs_show(const char *docs); -char *texttool_docs_get(); -void texttool_docs_clear(); +char *texttool_docs_get(void); +void texttool_docs_clear(void); #ifdef __cplusplus } diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c index b781b18862c..2469f7f7dbe 100644 --- a/source/blender/blenkernel/intern/cloth.c +++ b/source/blender/blenkernel/intern/cloth.c @@ -65,7 +65,7 @@ void tend ( void ) { gettimeofday ( &_tend,&tz ); } -double tval() +double tval(void) { double t1, t2; t1 = ( double ) _tstart.tv_sec + ( double ) _tstart.tv_usec/ ( 1000*1000 ); diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c index c1a6200bf60..f92f2326aeb 100644 --- a/source/blender/blenkernel/intern/constraint.c +++ b/source/blender/blenkernel/intern/constraint.c @@ -3903,7 +3903,7 @@ static bConstraintTypeInfo *constraintsTypeInfo[NUM_CONSTRAINT_TYPES]; static short CTI_INIT= 1; /* when non-zero, the list needs to be updated */ /* This function only gets called when CTI_INIT is non-zero */ -static void constraints_init_typeinfo () { +static void constraints_init_typeinfo (void) { constraintsTypeInfo[0]= NULL; /* 'Null' Constraint */ constraintsTypeInfo[1]= &CTI_CHILDOF; /* ChildOf Constraint */ constraintsTypeInfo[2]= &CTI_TRACKTO; /* TrackTo Constraint */ diff --git a/source/blender/blenkernel/intern/fmodifier.c b/source/blender/blenkernel/intern/fmodifier.c index 5ef41d17d63..1ed8241325e 100644 --- a/source/blender/blenkernel/intern/fmodifier.c +++ b/source/blender/blenkernel/intern/fmodifier.c @@ -932,7 +932,7 @@ static FModifierTypeInfo *fmodifiersTypeInfo[FMODIFIER_NUM_TYPES]; static short FMI_INIT= 1; /* when non-zero, the list needs to be updated */ /* This function only gets called when FMI_INIT is non-zero */ -static void fmods_init_typeinfo () +static void fmods_init_typeinfo (void) { fmodifiersTypeInfo[0]= NULL; /* 'Null' F-Curve Modifier */ fmodifiersTypeInfo[1]= &FMI_GENERATOR; /* Generator F-Curve Modifier */ diff --git a/source/blender/blenkernel/intern/icons.c b/source/blender/blenkernel/intern/icons.c index 78306705d6b..30e4318e256 100644 --- a/source/blender/blenkernel/intern/icons.c +++ b/source/blender/blenkernel/intern/icons.c @@ -76,7 +76,7 @@ static void icon_free(void *val) /* create an id for a new icon and make sure that ids from deleted icons get reused after the integer number range is used up */ -static int get_next_free_id() +static int get_next_free_id(void) { int startId = gFirstIconId; diff --git a/source/blender/blenkernel/intern/implicit.c b/source/blender/blenkernel/intern/implicit.c index bdf71a8c6f0..3d6710b186d 100644 --- a/source/blender/blenkernel/intern/implicit.c +++ b/source/blender/blenkernel/intern/implicit.c @@ -85,7 +85,7 @@ static void itend(void) { gettimeofday(&_itend,&itz); } -double itval() +double itval(void) { double t1, t2; t1 = (double)_itstart.tv_sec + (double)_itstart.tv_usec/(1000*1000); diff --git a/source/blender/blenkernel/intern/material.c b/source/blender/blenkernel/intern/material.c index 8096f0277bb..ac61acac56a 100644 --- a/source/blender/blenkernel/intern/material.c +++ b/source/blender/blenkernel/intern/material.c @@ -1402,7 +1402,7 @@ void paste_matcopybuf(Material *ma) MEM_freeN(ma->nodetree); } - GPU_materials_free(ma); + GPU_material_free(ma); id= (ma->id); memcpy(ma, &matcopybuf, sizeof(Material)); diff --git a/source/blender/blenkernel/intern/seqeffects.c b/source/blender/blenkernel/intern/seqeffects.c index 2efef52ed3e..c11b51b9dd4 100644 --- a/source/blender/blenkernel/intern/seqeffects.c +++ b/source/blender/blenkernel/intern/seqeffects.c @@ -119,8 +119,8 @@ static struct ImBuf * prepare_effect_imbufs( static void open_plugin_seq(PluginSeq *pis, const char *seqname) { - int (*version)(); - void* (*alloc_private)(); + int (*version)(void); + void* (*alloc_private)(void); char *cp; /* to be sure: (is tested for) */ @@ -143,7 +143,7 @@ static void open_plugin_seq(PluginSeq *pis, const char *seqname) if (pis->handle != 0) { /* find the address of the version function */ - version= (int (*)())PIL_dynlib_find_symbol(pis->handle, "plugin_seq_getversion"); + version= (int (*)(void))PIL_dynlib_find_symbol(pis->handle, "plugin_seq_getversion"); if (test_dlerr(pis->name, "plugin_seq_getversion")) return; if (version != 0) { @@ -177,7 +177,7 @@ static void open_plugin_seq(PluginSeq *pis, const char *seqname) return; } } - alloc_private = (void* (*)())PIL_dynlib_find_symbol( + alloc_private = (void* (*)(void))PIL_dynlib_find_symbol( pis->handle, "plugin_seq_alloc_private_data"); if (alloc_private) { pis->instance_private_data = alloc_private(); @@ -246,7 +246,7 @@ static void init_plugin(Sequence * seq, const char * fname) /* * FIXME: should query plugin! Could be generator, that needs zero inputs... */ -static int num_inputs_plugin() +static int num_inputs_plugin(void) { return 1; } @@ -969,7 +969,7 @@ static void gamtabs(float gamma) } -static void build_gammatabs() +static void build_gammatabs(void) { if (gamma_tabs_init == FALSE) { gamtabs(2.0f); @@ -1860,7 +1860,7 @@ static void init_wipe_effect(Sequence *seq) seq->effectdata = MEM_callocN(sizeof(struct WipeVars), "wipevars"); } -static int num_inputs_wipe() +static int num_inputs_wipe(void) { return 1; } @@ -2044,7 +2044,7 @@ static void init_transform_effect(Sequence *seq) transform->uniform_scale=0; } -static int num_inputs_transform() +static int num_inputs_transform(void) { return 1; } @@ -2613,7 +2613,7 @@ static void init_glow_effect(Sequence *seq) glow->bNoComp = 0; } -static int num_inputs_glow() +static int num_inputs_glow(void) { return 1; } @@ -2700,7 +2700,7 @@ static void init_solid_color(Sequence *seq) cv->col[0] = cv->col[1] = cv->col[2] = 0.5; } -static int num_inputs_color() +static int num_inputs_color(void) { return 0; } @@ -2809,7 +2809,7 @@ static struct ImBuf * do_solid_color( ********************************************************************** */ /* no effect inputs for multicam, we use give_ibuf_seq */ -static int num_inputs_multicam() +static int num_inputs_multicam(void) { return 0; } @@ -2884,7 +2884,7 @@ static void load_speed_effect(Sequence * seq) v->length = 0; } -static int num_inputs_speed() +static int num_inputs_speed(void) { return 1; } @@ -3059,7 +3059,7 @@ static void free_noop(struct Sequence *UNUSED(seq)) } -static int num_inputs_default() +static int num_inputs_default(void) { return 2; } diff --git a/source/blender/blenkernel/intern/softbody.c b/source/blender/blenkernel/intern/softbody.c index 978b3c9864f..ceee544d1b8 100644 --- a/source/blender/blenkernel/intern/softbody.c +++ b/source/blender/blenkernel/intern/softbody.c @@ -1659,7 +1659,7 @@ static void *exec_scan_for_ext_spring_forces(void *data) return 0; } -static void sb_sfesf_threads_run(Scene *scene, struct Object *ob, float timenow,int totsprings,int *UNUSED(ptr_to_break_func())) +static void sb_sfesf_threads_run(Scene *scene, struct Object *ob, float timenow,int totsprings,int *UNUSED(ptr_to_break_func(void))) { ListBase *do_effector = NULL; ListBase threads; @@ -2175,7 +2175,7 @@ static void sb_spring_force(Object *ob,int bpi,BodySpring *bs,float iks,float UN /* since this is definitely the most CPU consuming task here .. try to spread it */ /* core function _softbody_calc_forces_slice_in_a_thread */ /* result is int to be able to flag user break */ -static int _softbody_calc_forces_slice_in_a_thread(Scene *scene, Object *ob, float forcetime, float timenow,int ifirst,int ilast,int *UNUSED(ptr_to_break_func()),ListBase *do_effector,int do_deflector,float fieldfactor, float windfactor) +static int _softbody_calc_forces_slice_in_a_thread(Scene *scene, Object *ob, float forcetime, float timenow,int ifirst,int ilast,int *UNUSED(ptr_to_break_func(void)),ListBase *do_effector,int do_deflector,float fieldfactor, float windfactor) { float iks; int bb,do_selfcollision,do_springcollision,do_aero; @@ -2386,7 +2386,7 @@ static void *exec_softbody_calc_forces(void *data) return 0; } -static void sb_cf_threads_run(Scene *scene, Object *ob, float forcetime, float timenow,int totpoint,int *UNUSED(ptr_to_break_func()),struct ListBase *do_effector,int do_deflector,float fieldfactor, float windfactor) +static void sb_cf_threads_run(Scene *scene, Object *ob, float forcetime, float timenow,int totpoint,int *UNUSED(ptr_to_break_func(void)),struct ListBase *do_effector,int do_deflector,float fieldfactor, float windfactor) { ListBase threads; SB_thread_context *sb_threads; diff --git a/source/blender/blenkernel/intern/suggestions.c b/source/blender/blenkernel/intern/suggestions.c index 1b720c1adaa..7d39203cefc 100644 --- a/source/blender/blenkernel/intern/suggestions.c +++ b/source/blender/blenkernel/intern/suggestions.c @@ -54,7 +54,7 @@ static int txttl_cmp(const char *first, const char *second, int len) { return cmp; } -static void txttl_free_suggest() { +static void txttl_free_suggest(void) { SuggItem *item, *prev; for (item = suggestions.last; item; item=prev) { prev = item->prev; @@ -66,7 +66,7 @@ static void txttl_free_suggest() { suggestions.top = 0; } -static void txttl_free_docs() { +static void txttl_free_docs(void) { if (documentation) { MEM_freeN(documentation); documentation = NULL; diff --git a/source/blender/blenkernel/intern/text.c b/source/blender/blenkernel/intern/text.c index bdb8d11945c..b78525d4f4e 100644 --- a/source/blender/blenkernel/intern/text.c +++ b/source/blender/blenkernel/intern/text.c @@ -93,7 +93,7 @@ TMARK_EDITALL is set the group ID defines which other markers should be edited. The mrk->clr field is used to visually group markers where the flags may not match. A template system, for example, may allow editing of repeating tokens (in one group) but include other marked positions (in another group) all in the -same template with the same colour. +same template with the same color. Undo -- diff --git a/source/blender/blenkernel/intern/writeframeserver.c b/source/blender/blenkernel/intern/writeframeserver.c index bbc441f3622..3bdfd6c6b74 100644 --- a/source/blender/blenkernel/intern/writeframeserver.c +++ b/source/blender/blenkernel/intern/writeframeserver.c @@ -77,16 +77,16 @@ static int select_was_interrupted_by_signal() return (WSAGetLastError() == WSAEINTR); } #else -static int startup_socket_system() +static int startup_socket_system(void) { return 1; } -static void shutdown_socket_system() +static void shutdown_socket_system(void) { } -static int select_was_interrupted_by_signal() +static int select_was_interrupted_by_signal(void) { return (errno == EINTR); } @@ -367,7 +367,7 @@ int append_frameserver(RenderData *UNUSED(rd), int frame, int *pixels, int rectx return 0; } -void end_frameserver() +void end_frameserver(void) { if (connsock != -1) { closesocket(connsock); -- cgit v1.2.3