Silencing some compiler warnings for mingw

* Unused functions
* Uninitialised vars
This commit is contained in:
Joshua Leung 2009-10-21 10:56:31 +00:00
parent 7685def9af
commit 2344d62dfb
13 changed files with 19 additions and 64 deletions

@ -32,6 +32,11 @@
struct wmKeyConfig;
/* particle_edit.c */
int PE_poll(struct bContext *C);
int PE_hair_poll(struct bContext *C);
int PE_poll_3dview(struct bContext *C);
/* operators */
void ED_operatortypes_physics(void);
void ED_keymap_physics(struct wmKeyConfig *keyconf);

@ -1311,7 +1311,7 @@ static void make_prim_ext(bContext *C, int type, int tot, int seg,
int subdiv, float dia, float depth, int ext, int fill)
{
Object *obedit= CTX_data_edit_object(C);
int newob;
int newob = 0;
float mat[4][4];
if(obedit==NULL || obedit->type!=OB_MESH) {

@ -4240,7 +4240,6 @@ void editmesh_align_view_to_selected(Object *obedit, EditMesh *em, wmOperator *o
static int smooth_vertex(bContext *C, wmOperator *op)
{
ToolSettings *ts= CTX_data_tool_settings(C);
Object *obedit= CTX_data_edit_object(C);
EditMesh *em= BKE_mesh_get_editmesh(((Mesh *)obedit->data));
EditVert *eve, *eve_mir = NULL;

@ -851,7 +851,7 @@ static void pe_deflect_emitter(Scene *scene, Object *ob, PTCacheEdit *edit)
ParticleSystemModifierData *psmd;
POINT_P; KEY_K;
int index;
float *vec, *nor, dvec[3], dot, dist_1st;
float *vec, *nor, dvec[3], dot, dist_1st=0.0f;
float hairimat[4][4], hairmat[4][4];
if(edit==NULL || edit->psys==NULL || (pset->flag & PE_DEFLECT_EMITTER)==0 || (edit->psys->flag & PSYS_GLOBAL_HAIR))
@ -2819,7 +2819,7 @@ static void brush_puff(PEData *data, int point_index)
PTCacheEditPoint *point = edit->points + point_index;
KEY_K;
float mat[4][4], imat[4][4];
float lastco[3], rootco[3], co[3], nor[3], kco[3], dco[3], fac, length;
float lastco[3], rootco[3], co[3], nor[3], kco[3], dco[3], fac=0.0f, length=0.0f;
if(psys && !(psys->flag & PSYS_GLOBAL_HAIR)) {
psys_mat_hair_to_global(data->ob, data->dm, psys->part->from, psys->particles + point_index, mat);

@ -601,7 +601,7 @@ static void connect_hair(Scene *scene, Object *ob, ParticleSystem *psys)
ParticleData *pa;
PTCacheEdit *edit;
PTCacheEditPoint *point;
PTCacheEditKey *ekey;
PTCacheEditKey *ekey = NULL;
HairKey *key;
BVHTreeFromMesh bvhtree;
BVHTreeNearest nearest;

@ -36,10 +36,6 @@
struct wmOperatorType;
/* particle_edit.c */
int PE_poll(struct bContext *C);
int PE_hair_poll(struct bContext *C);
int PE_poll_3dview(struct bContext *C);
void PARTICLE_OT_select_all_toggle(struct wmOperatorType *ot);
void PARTICLE_OT_select_first(struct wmOperatorType *ot);
void PARTICLE_OT_select_last(struct wmOperatorType *ot);

@ -2520,7 +2520,7 @@ static ScrArea *find_area_showing_r_result(bContext *C)
{
wmWindowManager *wm= CTX_wm_manager(C);
wmWindow *win;
ScrArea *sa;
ScrArea *sa = NULL;
SpaceImage *sima;
/* find an imagewindow showing render result */

@ -135,6 +135,7 @@ static char cursor_char_prev(ConsoleLine *cl)
return cl->line[cl->cursor-1];
}
#if 0 // XXX unused
static char cursor_char_next(ConsoleLine *cl)
{
/* assume cursor is clamped */
@ -159,8 +160,10 @@ static void console_history_debug(const bContext *C)
{
SpaceConsole *sc= CTX_wm_space_console(C);
console_lb_debug__internal(&sc->history);
}
#endif
static ConsoleLine *console_lb_add__internal(ListBase *lb, ConsoleLine *from)
{

@ -1077,35 +1077,7 @@ static void node_composit_buts_renderlayers(uiLayout *layout, PointerRNA *ptr)
}
}
static void node_blur_relative_cb(bContext *C, void *node, void *poin2)
{
bNode *nodev= node;
NodeBlurData *nbd= nodev->storage;
if(nbd->image_in_width != 0){
if(nbd->relative){ /* convert absolute values to relative */
nbd->percentx= (float)(nbd->sizex)/nbd->image_in_width;
nbd->percenty= (float)(nbd->sizey)/nbd->image_in_height;
}else{ /* convert relative values to absolute */
nbd->sizex= (int)(nbd->percentx*nbd->image_in_width);
nbd->sizey= (int)(nbd->percenty*nbd->image_in_height);
}
}
// allqueue(REDRAWNODE, 0);
}
static void node_blur_update_sizex_cb(bContext *C, void *node, void *poin2)
{
bNode *nodev= node;
NodeBlurData *nbd= nodev->storage;
nbd->sizex= (int)(nbd->percentx*nbd->image_in_width);
}
static void node_blur_update_sizey_cb(bContext *C, void *node, void *poin2)
{
bNode *nodev= node;
NodeBlurData *nbd= nodev->storage;
nbd->sizey= (int)(nbd->percenty*nbd->image_in_height);
}
static void node_composit_buts_blur(uiLayout *layout, PointerRNA *ptr)
{
uiLayout *col;

@ -3771,9 +3771,8 @@ static void do_outliner_drivers_editop(SpaceOops *soops, ListBase *tree, short m
}
/* only if ID and path were set, should we perform any actions */
// FIXME: if whole array flag is set, mus add the entire array
if (id && path) {
int arraylen, i;
int arraylen;
/* array checks */
if (flag & KSP_FLAG_WHOLE_ARRAY) {

@ -4157,7 +4157,7 @@ static void draw_ptcache_edit(Scene *scene, View3D *v3d, RegionView3D *rv3d, Obj
PTCacheEditKey *key;
ParticleEditSettings *pset = PE_settings(scene);
int i, k, totpoint = edit->totpoint, timed = pset->flag & PE_FADE_TIME ? pset->fade_frames : 0;
int steps;
int steps=1;
char nosel[4], sel[4];
float sel_col[3];
float nosel_col[3];

@ -217,7 +217,7 @@ void draw_volume(Scene *scene, ARegion *ar, View3D *v3d, Base *base, GPUTexture
RegionView3D *rv3d= ar->regiondata;
float viewnormal[3];
int i, j, n, good_index, count = 0;
int i, j, n, good_index;
float d, d0, dd, ds;
float *points = NULL;
int numpoints = 0;

@ -1300,6 +1300,7 @@ static void view3d_panel_preview(bContext *C, ARegion *ar, short cntrl) // VIEW3
}
#endif
#if 0 // XXX not used
static void delete_sketch_armature(bContext *C, void *arg1, void *arg2)
{
BIF_deleteSketch(C);
@ -1316,6 +1317,7 @@ static void assign_template_sketch_armature(bContext *C, void *arg1, void *arg2)
BIF_setTemplate(C, index);
}
static int view3d_panel_bonesketch_spaces_poll(const bContext *C, PanelType *pt)
{
Object *obedit = CTX_data_edit_object(C);
@ -1432,8 +1434,6 @@ static void view3d_panel_bonesketch_spaces(const bContext *C, Panel *pa)
uiBlockEndAlign(block);
}
#if 0 // XXX not used
/* op->invoke */
static void redo_cb(bContext *C, void *arg_op, void *arg2)
{
@ -1496,26 +1496,7 @@ void view3d_buttons_register(ARegionType *art)
strcpy(pt->label, "Grease Pencil");
pt->draw= gpencil_panel_standard;
BLI_addtail(&art->paneltypes, pt);
/*
pt= MEM_callocN(sizeof(PanelType), "spacetype view3d panel properties");
strcpy(pt->idname, "VIEW3D_PT_properties");
strcpy(pt->label, "View Properties");
pt->draw= view3d_panel_properties;
BLI_addtail(&art->paneltypes, pt);
pt= MEM_callocN(sizeof(PanelType), "spacetype view3d panel transform spaces");
strcpy(pt->idname, "VIEW3D_PT_transform spaces");
strcpy(pt->label, "Transform Orientations");
pt->draw= view3d_panel_transform_spaces;
BLI_addtail(&art->paneltypes, pt);
pt= MEM_callocN(sizeof(PanelType), "spacetype view3d panel bonesketch spaces");
strcpy(pt->idname, "VIEW3D_PT_bonesketch_spaces");
strcpy(pt->label, "Bone Sketching");
pt->draw= view3d_panel_bonesketch_spaces;
pt->poll= view3d_panel_bonesketch_spaces_poll;
BLI_addtail(&art->paneltypes, pt);
*/
// XXX view3d_panel_preview(C, ar, 0);
}