Warning fixes for blenkernel and editors.

Note sure what to do with this one, and personally think
we should avoid using macros for this kind of thing:

V_GROW(edges);
source/blender/editors/mesh/loopcut.c:232: warning: value computed is not used
This commit is contained in:
Brecht Van Lommel
2009-09-17 14:46:22 +00:00
parent 09652d8c05
commit fbbda4c06e
18 changed files with 27 additions and 40 deletions

View File

@@ -1026,6 +1026,7 @@ static void berekeny (float f1, float f2, float f3, float f4, float *o, int b)
}
}
#if 0
static void berekenx (float *f, float *o, int b)
{
float t, c0, c1, c2, c3;
@@ -1041,6 +1042,7 @@ static void berekenx (float *f, float *o, int b)
o[a]= c0 + t*c1 + t*t*c2 + t*t*t*c3;
}
}
#endif
/* -------------------------- */

View File

@@ -496,6 +496,7 @@ DO_INLINE void mulsub_fmatrix_fvector(float to[3], float matrix[3][3], float fro
// SPARSE SYMMETRIC big matrix with 3x3 matrix entries
///////////////////////////
/* printf a big matrix on console: for debug output */
#if 0
static void print_bfmatrix(fmatrix3x3 *m3)
{
unsigned int i = 0;
@@ -505,6 +506,8 @@ static void print_bfmatrix(fmatrix3x3 *m3)
print_fmatrix(m3[i].m);
}
}
#endif
/* create big matrix */
DO_INLINE fmatrix3x3 *create_bfmatrix(unsigned int verts, unsigned int springs)
{
@@ -1417,7 +1420,6 @@ static void hair_velocity_smoothing(float smoothfac, lfVector *lF, lfVector *lX,
int i = 0;
int j = 0;
int k = 0;
lfVector temp;
INIT_MINMAX(gmin, gmax);

View File

@@ -8503,6 +8503,7 @@ ModifierTypeInfo *modifierType_getInfo(ModifierType type)
mti->initData = smoothModifier_initData;
mti->copyData = smoothModifier_copyData;
mti->requiredDataMask = smoothModifier_requiredDataMask;
mti->isDisabled = smoothModifier_isDisabled;
mti->deformVerts = smoothModifier_deformVerts;
mti->deformVertsEM = smoothModifier_deformVertsEM;
@@ -8513,6 +8514,7 @@ ModifierTypeInfo *modifierType_getInfo(ModifierType type)
mti->initData = castModifier_initData;
mti->copyData = castModifier_copyData;
mti->requiredDataMask = castModifier_requiredDataMask;
mti->isDisabled = castModifier_isDisabled;
mti->foreachObjectLink = castModifier_foreachObjectLink;
mti->updateDepgraph = castModifier_updateDepgraph;
mti->deformVerts = castModifier_deformVerts;
@@ -9137,19 +9139,6 @@ int modifiers_indexInObject(Object *ob, ModifierData *md_seek)
return i;
}
static int modifiers_usesPointCache(Object *ob)
{
ModifierData *md = ob->modifiers.first;
for (; md; md=md->next) {
ModifierTypeInfo *mti = modifierType_getInfo(md->type);
if (mti->flags & eModifierTypeFlag_UsesPointCache) {
return 1;
}
}
return 0;
}
void modifier_freeTemporaryData(ModifierData *md)
{
if(md->type == eModifierType_Armature) {

View File

@@ -2562,7 +2562,7 @@ int ray_hit_boundbox(struct BoundBox *bb, float ray_start[3], float ray_normal[3
static int pc_cmp(void *a, void *b)
{
LinkData *ad = a, *bd = b;
if((int)ad->data > (int)bd->data)
if(GET_INT_FROM_POINTER(ad->data) > GET_INT_FROM_POINTER(bd->data))
return 1;
else return 0;
}
@@ -2576,14 +2576,14 @@ int object_insert_ptcache(Object *ob)
for(link=ob->pc_ids.first, i = 0; link; link=link->next, i++)
{
int index =(int)link->data;
int index = GET_INT_FROM_POINTER(link->data);
if(i < index)
break;
}
link = MEM_callocN(sizeof(LinkData), "PCLink");
link->data = (void *)i;
link->data = SET_INT_IN_POINTER(i);
BLI_addtail(&ob->pc_ids, link);
return i;

View File

@@ -81,7 +81,6 @@
#include "RE_render_ext.h"
static void key_from_object(Object *ob, ParticleKey *key);
static void get_cpa_texture(DerivedMesh *dm, Material *ma, int face_index,
float *fuv, float *orco, ParticleTexture *ptex, int event);
static void get_child_modifier_parameters(ParticleSettings *part, ParticleThreadContext *ctx,
@@ -3039,6 +3038,7 @@ void psys_key_to_object(Object *ob, ParticleKey *key, float imat[][4]){
VECSUB(key->vel,key->vel,key->co);
QuatMul(key->rot,q,key->rot);
}
#if 0
static void key_from_object(Object *ob, ParticleKey *key){
float q[4];
@@ -3051,6 +3051,7 @@ static void key_from_object(Object *ob, ParticleKey *key){
VECSUB(key->vel,key->vel,key->co);
QuatMul(key->rot,q,key->rot);
}
#endif
static void triatomat(float *v1, float *v2, float *v3, float (*uv)[2], float mat[][4])
{

View File

@@ -122,7 +122,6 @@ static int get_current_display_percentage(ParticleSystem *psys)
void psys_reset(ParticleSystem *psys, int mode)
{
ParticleSettings *part= psys->part;
PARTICLE_P;
if(ELEM(mode, PSYS_RESET_ALL, PSYS_RESET_DEPSGRAPH)) {

View File

@@ -596,17 +596,15 @@ static TextLine *txt_new_line(char *str)
return tmp;
}
static TextLine *txt_new_linen(char *str, int n)
static TextLine *txt_new_linen(const char *str, int n)
{
TextLine *tmp;
if(!str) str= "";
tmp= (TextLine *) MEM_mallocN(sizeof(TextLine), "textline");
tmp->line= MEM_mallocN(n+1, "textline_string");
tmp->format= NULL;
BLI_strncpy(tmp->line, str, n+1);
BLI_strncpy(tmp->line, (str)? str: "", n+1);
tmp->len= strlen(tmp->line);
tmp->next= tmp->prev= NULL;

View File

@@ -148,7 +148,7 @@ static int write_audio_frame(void)
#else
pkt.pts = c->coded_frame->pts;
#endif
fprintf(stderr, "Audio Frame PTS: %lld\n", pkt.pts);
fprintf(stderr, "Audio Frame PTS: %d\n", (int)pkt.pts);
pkt.stream_index = audio_stream->index;
pkt.flags |= PKT_FLAG_KEY;
@@ -265,7 +265,7 @@ static void write_video_frame(RenderData *rd, AVFrame* frame)
#else
packet.pts = c->coded_frame->pts;
#endif
fprintf(stderr, "Video Frame PTS: %lld\n", packet.pts);
fprintf(stderr, "Video Frame PTS: %d\n", (int)packet.pts);
} else {
fprintf(stderr, "Video Frame PTS: not set\n");
}