Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2009-06-22 22:19:18 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2009-06-22 22:19:18 +0400
commite7d02e567990b8cac05565501e0b74a9bb195a6d (patch)
tree3e96cef1967c7c07e421303a2ebe6c984fa2f2ee /source/blender/blenkernel
parentbce3f7e019c174947a0f98063f39533eb59ab03e (diff)
2.5: warning fixes
Mostly harmless ones, except for one about "gzopen64" being undeclared. This needs some defines in BLI_storage.h to be set before <unistd.h> is included. Might fix a crash in compressed file reading, though I'm not sure since it's hard to repeat the crash consistently.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/intern/constraint.c8
-rw-r--r--source/blender/blenkernel/intern/effect.c2
-rw-r--r--source/blender/blenkernel/intern/exotic.c1
-rw-r--r--source/blender/blenkernel/intern/fluidsim.c2
-rw-r--r--source/blender/blenkernel/intern/idprop.c8
-rw-r--r--source/blender/blenkernel/intern/particle_system.c12
-rw-r--r--source/blender/blenkernel/intern/pointcache.c4
7 files changed, 23 insertions, 14 deletions
diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c
index a43389a2ef6..88e73a00ba7 100644
--- a/source/blender/blenkernel/intern/constraint.c
+++ b/source/blender/blenkernel/intern/constraint.c
@@ -3028,7 +3028,7 @@ static void transform_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *
if (VALID_CONS_TARGET(ct)) {
float loc[3], eul[3], size[3];
float dvec[3], sval[3];
- short i;
+ int i;
/* obtain target effect */
switch (data->from) {
@@ -3075,7 +3075,7 @@ static void transform_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *
switch (data->to) {
case 2: /* scaling */
for (i=0; i<3; i++)
- size[i]= data->to_min[i] + (sval[data->map[i]] * (data->to_max[i] - data->to_min[i]));
+ size[i]= data->to_min[i] + (sval[(int)data->map[i]] * (data->to_max[i] - data->to_min[i]));
break;
case 1: /* rotation */
for (i=0; i<3; i++) {
@@ -3085,7 +3085,7 @@ static void transform_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *
tmax= data->to_max[i];
/* all values here should be in degrees */
- eul[i]= tmin + (sval[data->map[i]] * (tmax - tmin));
+ eul[i]= tmin + (sval[(int)data->map[i]] * (tmax - tmin));
/* now convert final value back to radians */
eul[i] = (float)(eul[i] / 180 * M_PI);
@@ -3094,7 +3094,7 @@ static void transform_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *
default: /* location */
/* get new location */
for (i=0; i<3; i++)
- loc[i]= (data->to_min[i] + (sval[data->map[i]] * (data->to_max[i] - data->to_min[i])));
+ loc[i]= (data->to_min[i] + (sval[(int)data->map[i]] * (data->to_max[i] - data->to_min[i])));
/* add original location back on (so that it can still be moved) */
VecAddf(loc, cob->matrix[3], loc);
diff --git a/source/blender/blenkernel/intern/effect.c b/source/blender/blenkernel/intern/effect.c
index 9858025af5a..eaa2d541638 100644
--- a/source/blender/blenkernel/intern/effect.c
+++ b/source/blender/blenkernel/intern/effect.c
@@ -29,6 +29,8 @@
* ***** END GPL LICENSE BLOCK *****
*/
+#include "BLI_storage.h" /* _LARGEFILE_SOURCE */
+
#include <math.h>
#include <stdlib.h>
diff --git a/source/blender/blenkernel/intern/exotic.c b/source/blender/blenkernel/intern/exotic.c
index f15e1c24949..4e7e76dfae3 100644
--- a/source/blender/blenkernel/intern/exotic.c
+++ b/source/blender/blenkernel/intern/exotic.c
@@ -29,6 +29,7 @@
*
* ***** END GPL LICENSE BLOCK *****/
+#include "BLI_storage.h"
#include <ctype.h> /* isdigit, isspace */
#include <math.h>
diff --git a/source/blender/blenkernel/intern/fluidsim.c b/source/blender/blenkernel/intern/fluidsim.c
index 9eefd48cae4..54008185f72 100644
--- a/source/blender/blenkernel/intern/fluidsim.c
+++ b/source/blender/blenkernel/intern/fluidsim.c
@@ -28,6 +28,8 @@
* ***** END GPL LICENSE BLOCK *****
*/
+#include "BLI_storage.h" /* _LARGEFILE_SOURCE */
+
#include "MEM_guardedalloc.h"
#include "DNA_mesh_types.h"
diff --git a/source/blender/blenkernel/intern/idprop.c b/source/blender/blenkernel/intern/idprop.c
index 3be47778674..54366aadd92 100644
--- a/source/blender/blenkernel/intern/idprop.c
+++ b/source/blender/blenkernel/intern/idprop.c
@@ -230,16 +230,16 @@ void IDP_ResizeArray(IDProperty *prop, int newlen)
*/
newsize = (newsize >> 3) + (newsize < 9 ? 3 : 6) + newsize;
- newarr = MEM_callocN(idp_size_table[prop->subtype]*newsize, "idproperty array resized");
+ newarr = MEM_callocN(idp_size_table[(int)prop->subtype]*newsize, "idproperty array resized");
if (newlen >= prop->len) {
/* newlen is bigger*/
- memcpy(newarr, prop->data.pointer, prop->len*idp_size_table[prop->subtype]);
+ memcpy(newarr, prop->data.pointer, prop->len*idp_size_table[(int)prop->subtype]);
idp_resize_group_array(prop, newlen, newarr);
}
else {
/* newlen is smaller*/
idp_resize_group_array(prop, newlen, newarr);
- memcpy(newarr, prop->data.pointer, newlen*prop->len*idp_size_table[prop->subtype]);
+ memcpy(newarr, prop->data.pointer, newlen*prop->len*idp_size_table[(int)prop->subtype]);
}
MEM_freeN(prop->data.pointer);
@@ -546,7 +546,7 @@ int IDP_EqualsProperties(IDProperty *prop1, IDProperty *prop2)
return BSTR_EQ(IDP_String(prop1), IDP_String(prop2));
else if(prop1->type == IDP_ARRAY) {
if(prop1->len == prop2->len && prop1->subtype == prop2->subtype)
- return memcmp(IDP_Array(prop1), IDP_Array(prop2), idp_size_table[prop1->subtype]*prop1->len);
+ return memcmp(IDP_Array(prop1), IDP_Array(prop2), idp_size_table[(int)prop1->subtype]*prop1->len);
else
return 0;
}
diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c
index fc6413849d1..97b1956bba9 100644
--- a/source/blender/blenkernel/intern/particle_system.c
+++ b/source/blender/blenkernel/intern/particle_system.c
@@ -29,6 +29,8 @@
* ***** END GPL LICENSE BLOCK *****
*/
+#include "BLI_storage.h" /* _LARGEFILE_SOURCE */
+
#include <stdlib.h>
#include <math.h>
#include <string.h>
@@ -2203,12 +2205,15 @@ void psys_get_pointcache_start_end(Scene *scene, ParticleSystem *psys, int *sfra
*sfra = MAX2(1, (int)part->sta);
*efra = MIN2((int)(part->end + part->lifetime + 1.0), scene->r.efra);
}
-static float *particle_state_ptr(int index, ParticleSystem *psys)
+static float *particle_state_ptr(int index, void *psys_ptr)
{
+ ParticleSystem *psys= psys_ptr;
+
return (float *)(&(psys->particles+index)->state);
}
-static void particle_read_state(int index, ParticleSystem *psys, float *data)
+static void particle_read_state(int index, void *psys_ptr, float *data)
{
+ ParticleSystem *psys= psys_ptr;
ParticleData *pa = psys->particles + index;
ParticleKey *key = (ParticleKey *)data;
@@ -2217,8 +2222,9 @@ static void particle_read_state(int index, ParticleSystem *psys, float *data)
copy_particle_key(&pa->state, key, 1);
}
-static void particle_cache_interpolate(int index, ParticleSystem *psys, float frs_sec, float cfra, int cfra1, int cfra2, float *data1, float *data2)
+static void particle_cache_interpolate(int index, void *psys_ptr, float frs_sec, float cfra, int cfra1, int cfra2, float *data1, float *data2)
{
+ ParticleSystem *psys= psys_ptr;
ParticleData *pa = psys->particles + index;
ParticleKey keys[4];
float dfra;
diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c
index f59336518d7..b514ac026fb 100644
--- a/source/blender/blenkernel/intern/pointcache.c
+++ b/source/blender/blenkernel/intern/pointcache.c
@@ -1050,7 +1050,6 @@ void BKE_ptcache_make_cache(PTCacheBaker* baker)
int endframe = CFRA;
int bake = baker->bake;
int render = baker->render;
- int end = 0;
G.afbreek = 0;
@@ -1162,7 +1161,6 @@ void BKE_ptcache_toggle_disk_cache(PTCacheID *pid) {
int totelem=0;
int float_count=0;
int tot;
- int write_error=0;
if (!G.relbase_valid){
cache->flag &= ~PTCACHE_DISK_CACHE;
@@ -1243,4 +1241,4 @@ void BKE_ptcache_toggle_disk_cache(PTCacheID *pid) {
BKE_ptcache_id_clear(pid, PTCACHE_CLEAR_ALL, 0);
cache->flag &= ~PTCACHE_DISK_CACHE;
}
-} \ No newline at end of file
+}