From 4893cdc33855e566dade323fa2f8486536821018 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Wed, 26 Aug 2009 00:38:43 +0000 Subject: 2.5 - Warning cleanups (for mingw+scons) Also, made the Outliner's horizontal scrollbar work better for keymaps view. It's still using an approximation of the width, but at least you can scroll now. --- source/blender/blenkernel/intern/boids.c | 4 ++-- source/blender/blenkernel/intern/object.c | 4 ++-- source/blender/blenkernel/intern/particle_system.c | 2 +- source/blender/blenkernel/intern/pointcache.c | 20 ++++++++++---------- source/blender/blenkernel/intern/smoke.c | 12 +++++------- source/blender/blenkernel/intern/texture.c | 2 +- 6 files changed, 21 insertions(+), 23 deletions(-) (limited to 'source/blender/blenkernel') diff --git a/source/blender/blenkernel/intern/boids.c b/source/blender/blenkernel/intern/boids.c index d8926fc5753..5c62e434cb6 100644 --- a/source/blender/blenkernel/intern/boids.c +++ b/source/blender/blenkernel/intern/boids.c @@ -76,7 +76,7 @@ static int rule_goal_avoid(BoidRule *rule, BoidBrainData *bbd, BoidValues *val, Object *priority_ob = NULL; float vec[3] = {0.0f, 0.0f, 0.0f}, loc[3] = {0.0f, 0.0f, 0.0f}; float mul = (rule->type == eBoidRuleType_Avoid ? 1.0 : -1.0); - float priority = 0.0f, len; + float priority = 0.0f, len = 0.0f; int ret = 0; /* first find out goal/predator with highest priority */ @@ -614,7 +614,7 @@ static int rule_fight(BoidRule *rule, BoidBrainData *bbd, BoidValues *val, Parti KDTreeNearest *ptn = NULL; ParticleTarget *pt; ParticleData *epars; - ParticleData *enemy_pa; + ParticleData *enemy_pa = NULL; /* friends & enemies */ float closest_enemy[3] = {0.0f,0.0f,0.0f}; float closest_dist = fbr->distance + 1.0f; diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index 32f70bc690c..5e2a00c219d 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -2571,6 +2571,7 @@ int object_insert_ptcache(Object *ob) return i; } +#if 0 static int pc_findindex(ListBase *listbase, int index) { LinkData *link= NULL; @@ -2590,11 +2591,10 @@ static int pc_findindex(ListBase *listbase, int index) return -1; } -#if 0 void object_delete_ptcache(Object *ob, int index) { int list_index = pc_findindex(&ob->pc_ids, index); LinkData *link = BLI_findlink(&ob->pc_ids, list_index); BLI_freelinkN(&ob->pc_ids, link); } -#endif \ No newline at end of file +#endif diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c index dcd3fcd2f89..bf642a14a49 100644 --- a/source/blender/blenkernel/intern/particle_system.c +++ b/source/blender/blenkernel/intern/particle_system.c @@ -3238,7 +3238,7 @@ static void deflect_particle(Scene *scene, Object *pob, ParticleSystemModifierDa ParticleCollision col; BVHTreeRayHit hit; float ray_dir[3], zerovec[3]={0.0,0.0,0.0}; - float radius = ((part->flag & PART_SIZE_DEFL)?pa->size:0.0f), boid_z; + float radius = ((part->flag & PART_SIZE_DEFL)?pa->size:0.0f), boid_z = 0.0f; int deflections=0, max_deflections=10; VECCOPY(col.co1, pa->prev_state.co); diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c index 42bea260450..69da8f19d8c 100644 --- a/source/blender/blenkernel/intern/pointcache.c +++ b/source/blender/blenkernel/intern/pointcache.c @@ -424,8 +424,6 @@ void BKE_ptcache_id_from_softbody(PTCacheID *pid, Object *ob, SoftBody *sb) void BKE_ptcache_id_from_particles(PTCacheID *pid, Object *ob, ParticleSystem *psys) { - ParticleSystemModifierData *psmd= psys_get_modifier(ob, psys); - memset(pid, 0, sizeof(PTCacheID)); pid->ob= ob; @@ -484,7 +482,7 @@ static int ptcache_file_write(PTCacheFile *pf, void *f, size_t tot, int size); static int ptcache_compress_write(PTCacheFile *pf, unsigned char *in, unsigned int in_len, unsigned char *out, int mode) { - int r; + int r = 0; unsigned char compressed; LZO_HEAP_ALLOC(wrkmem, LZO1X_MEM_COMPRESS); unsigned int out_len = LZO_OUT_LEN(in_len); @@ -566,11 +564,12 @@ static int ptcache_write_smoke(PTCacheFile *pf, void *smoke_v) return 0; } +/* static int ptcache_write_smoke_turbulence(PTCacheFile *pf, void *smoke_v) { SmokeModifierData *smd= (SmokeModifierData *)smoke_v; SmokeDomainSettings *sds = smd->domain; - /* + if(sds->wt) { unsigned int res_big[3]; size_t res = sds->res[0]*sds->res[1]*sds->res[2]; @@ -599,16 +598,16 @@ static int ptcache_write_smoke_turbulence(PTCacheFile *pf, void *smoke_v) return 1; } -*/ return 0; } +*/ // forward decleration static int ptcache_file_read(PTCacheFile *pf, void *f, size_t tot, int size); static int ptcache_compress_read(PTCacheFile *pf, unsigned char *result, unsigned int len) { - int r; + int r = 0; unsigned char compressed = 0; unsigned int in_len; unsigned int out_len = len; @@ -673,11 +672,12 @@ static void ptcache_read_smoke(PTCacheFile *pf, void *smoke_v) } } +/* static void ptcache_read_smoke_turbulence(PTCacheFile *pf, void *smoke_v) { SmokeModifierData *smd= (SmokeModifierData *)smoke_v; SmokeDomainSettings *sds = smd->domain; - /* + if(sds->fluid) { unsigned int res[3]; float *dens, *densold, *tcu, *tcv, *tcw; @@ -690,8 +690,8 @@ static void ptcache_read_smoke_turbulence(PTCacheFile *pf, void *smoke_v) ptcache_compress_read(pf, (unsigned char*)dens, out_len); } - */ } +*/ void BKE_ptcache_id_from_smoke(PTCacheID *pid, struct Object *ob, struct SmokeModifierData *smd) { @@ -1162,7 +1162,7 @@ int BKE_ptcache_read_cache(PTCacheID *pid, float cfra, float frs_sec) int cfra1 = 0, cfra2 = 0; int totpoint = 0, totpoint2 = 0; int *index = &i, *index2 = &i; - int use_old = 0, old_frame; + int use_old = 0, old_frame = 0; int ret = 0, error = 0; @@ -2084,7 +2084,7 @@ void BKE_ptcache_make_cache(PTCacheBaker* baker) Base *base; ListBase pidlist; PTCacheID *pid = baker->pid; - PointCache *cache; + PointCache *cache = NULL; float frameleno = scene->r.framelen; int cfrao = CFRA; int startframe = MAXFRAME; diff --git a/source/blender/blenkernel/intern/smoke.c b/source/blender/blenkernel/intern/smoke.c index cd9679be486..223d48012df 100644 --- a/source/blender/blenkernel/intern/smoke.c +++ b/source/blender/blenkernel/intern/smoke.c @@ -92,10 +92,10 @@ static void tend ( void ) { QueryPerformanceCounter ( &liCurrentTime ); } -static double tval() -{ - return ((double)( (liCurrentTime.QuadPart - liStartTime.QuadPart)* (double)1000.0/(double)liFrequency.QuadPart )); -} +//static double tval() +//{ +// return ((double)( (liCurrentTime.QuadPart - liStartTime.QuadPart)* (double)1000.0/(double)liFrequency.QuadPart )); +//} #else #include static struct timeval _tstart, _tend; @@ -788,9 +788,8 @@ void smokeModifier_do(SmokeModifierData *smd, Scene *scene, Object *ob, DerivedM } else if(smd->type & MOD_SMOKE_TYPE_DOMAIN) { - PointCache *cache, *cache_wt; + PointCache *cache; PTCacheID pid; - PTCacheID pid_wt; float timescale; int cache_result = 0; int startframe, endframe, framenr; @@ -1424,7 +1423,6 @@ void smoke_calc_transparency(float *result, float *p0, float *p1, int res[3], fl { int x, y, z; float bv[6]; - float bigfactor = 1.0; // x bv[0] = p0[0]; diff --git a/source/blender/blenkernel/intern/texture.c b/source/blender/blenkernel/intern/texture.c index 96e9f54fc0c..61f62b2222d 100644 --- a/source/blender/blenkernel/intern/texture.c +++ b/source/blender/blenkernel/intern/texture.c @@ -750,7 +750,7 @@ void make_local_texture(Tex *tex) void autotexname(Tex *tex) { - char texstr[20][12]= {"None" , "Clouds" , "Wood", "Marble", "Magic" , "Blend", + char texstr[20][15]= {"None" , "Clouds" , "Wood", "Marble", "Magic" , "Blend", "Stucci", "Noise" , "Image", "Plugin", "EnvMap" , "Musgrave", "Voronoi", "DistNoise", "Point Density", "Voxel Data", "", "", "", ""}; Image *ima; -- cgit v1.2.3