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:
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");
}

View File

@@ -482,11 +482,10 @@ int removedoublesflag(EditMesh *em, short flag, short automerge, float limit) /
static int removedoublesflag_exec(bContext *C, wmOperator *op)
{
Object *obedit= CTX_data_edit_object(C);
ToolSettings *ts= CTX_data_tool_settings(C);
EditMesh *em= BKE_mesh_get_editmesh(((Mesh *)obedit->data));
char msg[100];
/*char msg[100];
int cnt = removedoublesflag(em,1,0,RNA_float_get(op->ptr, "limit"));
int cnt = removedoublesflag(em,1,0,RNA_float_get(op->ptr, "limit"));*/
/*XXX this messes up last operator panel
if(cnt)

View File

@@ -129,7 +129,7 @@ static void edgering_sel(tringselOpData *lcd, int previewlines, int select)
float (*edges)[2][3] = NULL;
V_DYNDECLARE(edges);
float co[2][3];
int looking=1, i, j=0, tot=0;
int looking=1, i, tot=0;
if (!startedge)
return;
@@ -318,7 +318,6 @@ static int ringsel_cancel (bContext *C, wmOperator *op)
static int ringsel_invoke (bContext *C, wmOperator *op, wmEvent *evt)
{
ScrArea *sa = CTX_wm_area(C);
tringselOpData *lcd;
EditEdge *edge;
int dist = 75;
@@ -347,7 +346,6 @@ static int ringsel_invoke (bContext *C, wmOperator *op, wmEvent *evt)
static int ringcut_invoke (bContext *C, wmOperator *op, wmEvent *evt)
{
ScrArea *sa = CTX_wm_area(C);
tringselOpData *lcd;
EditEdge *edge;
int dist = 75;

View File

@@ -30,6 +30,8 @@
#include <stdlib.h>
#include <string.h>
#include "MEM_guardedalloc.h"
#include "DNA_group_types.h"
#include "DNA_material_types.h"
#include "DNA_modifier_types.h"

View File

@@ -3911,7 +3911,6 @@ static int specials_menu_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
Scene *scene= CTX_data_scene(C);
ParticleEditSettings *pset=PE_settings(scene);
PTCacheEdit *edit = PE_get_current(scene, CTX_data_active_object(C));
uiPopupMenu *pup;
uiLayout *layout;

View File

@@ -635,7 +635,6 @@ void BIF_view3d_previewrender_clear(ScrArea *sa)
/* afterqueue call */
void BIF_view3d_previewrender(Scene *scene, ScrArea *sa)
{
bContext *C= NULL;
View3D *v3d= sa->spacedata.first;
RegionView3D *rv3d= NULL; // XXX
Render *re;

View File

@@ -541,7 +541,7 @@ void draw_image_grease_pencil(bContext *C, short onlyv2d)
}
else {
/* assume that UI_view2d_restore(C) has been called... */
SpaceImage *sima= (SpaceImage *)CTX_wm_space_data(C);
//SpaceImage *sima= (SpaceImage *)CTX_wm_space_data(C);
/* draw grease-pencil ('screen' strokes) */
//if (sima->flag & SI_DISPGP)

View File

@@ -169,7 +169,6 @@ static int larger_pow2(int n)
void draw_volume(Scene *scene, ARegion *ar, View3D *v3d, Base *base, GPUTexture *tex, float *min, float *max, int res[3], float dx, GPUTexture *tex_shadow)
{
Object *ob = base->object;
RegionView3D *rv3d= ar->regiondata;
float viewnormal[3];

View File

@@ -476,6 +476,7 @@ static void v3d_editvertex_buts(const bContext *C, uiBlock *block, View3D *v3d,
}
}
#if 0
/* assumes armature active */
static void validate_bonebutton_cb(bContext *C, void *bonev, void *namev)
{
@@ -494,10 +495,10 @@ static void validate_bonebutton_cb(bContext *C, void *bonev, void *namev)
ED_armature_bone_rename(ob->data, oldname, newname); // editarmature.c
}
}
#endif
static void v3d_posearmature_buts(uiBlock *block, View3D *v3d, Object *ob, float lim)
{
uiBut *but;
bArmature *arm;
bPoseChannel *pchan;
Bone *bone= NULL;
@@ -586,7 +587,6 @@ static void v3d_editarmature_buts(uiBlock *block, View3D *v3d, Object *ob, float
{
bArmature *arm= ob->data;
EditBone *ebone;
uiBut *but;
TransformProperties *tfp= v3d->properties_storage;
ebone= arm->edbo->first;

View File

@@ -323,6 +323,7 @@ static void rna_Pose_active_bone_group_index_range(PointerRNA *ptr, int *min, in
*max= MAX2(0, *max);
}
#if 0
static void rna_pose_bgroup_name_index_get(PointerRNA *ptr, char *value, int index)
{
bPose *pose= (bPose*)ptr->data;
@@ -373,6 +374,7 @@ static void rna_pose_pgroup_name_set(PointerRNA *ptr, const char *value, char *r
BLI_strncpy(result, "", maxlen);
}
#endif
#else

View File

@@ -422,7 +422,6 @@ void vol_shade_one_lamp(struct ShadeInput *shi, float *co, LampRen *lar, float *
float hitco[3], *atten_co;
float p;
float scatter_fac;
float shade_stepsize = vol_get_stepsize(shi, STEPSIZE_SHADE);
if (lar->mode & LA_LAYER) if((lar->lay & shi->obi->lay)==0) return;
if ((lar->lay & shi->lay)==0) return;
@@ -683,7 +682,6 @@ void shade_volume_shadow(struct ShadeInput *shi, struct ShadeResult *shr, struct
float hitco[3];
float tr[3] = {1.0,1.0,1.0};
Isect is;
float shade_stepsize = vol_get_stepsize(shi, STEPSIZE_SHADE);
float *startco, *endco;
float density=0.f;
@@ -749,4 +747,4 @@ void shade_volume_inside(ShadeInput *shi, ShadeResult *shr)
shi->mat = mat_backup;
shi->obi = obi_backup;
shi->obr = obi_backup->obr;
}
}