Silent a bunch of gcc warnings (usually dummy, but noisy!).

This commit is contained in:
2012-12-02 16:01:06 +00:00
parent 432193552c
commit 818a345be3
16 changed files with 49 additions and 39 deletions

View File

@@ -81,7 +81,7 @@ void AUD_LinearResampleReader::read(int& length, bool& eos, sample_t* buffer)
int samplesize = AUD_SAMPLE_SIZE(specs);
int size = length;
float factor = m_rate / m_reader->getSpecs().rate;
float spos;
float spos = 0.0f;
sample_t low, high;
eos = false;

View File

@@ -3366,7 +3366,7 @@ static int dynamicPaint_paintMesh(DynamicPaintSurface *surface,
(!hit_found || (brush->flags & MOD_DPAINT_INVERSE_PROX)))
{
float proxDist = -1.0f;
float hitCo[3];
float hitCo[3] = {0.0f, 0.0f, 0.0f};
short hQuad;
int face;
@@ -3723,6 +3723,8 @@ static int dynamicPaint_paintParticles(DynamicPaintSurface *surface,
float smooth_range = smooth * (1.0f - strength), dist;
/* calculate max range that can have particles with higher influence than the nearest one */
float max_range = smooth - strength * smooth + solidradius;
/* Make gcc happy! */
dist = max_range;
particles = BLI_kdtree_range_search(tree, max_range, bData->realCoord[bData->s_pos[index]].v, NULL, &nearest);

View File

@@ -189,7 +189,7 @@ static void BMEdit_RecalcTessellation_intern(BMEditMesh *tm)
#endif /* USE_TESSFACE_SPEEDUP */
else {
ScanFillVert *sf_vert, *sf_vert_last = NULL, *sf_vert_first = NULL;
ScanFillVert *sf_vert = NULL, *sf_vert_last = NULL, *sf_vert_first = NULL;
/* ScanFillEdge *e; */ /* UNUSED */
ScanFillFace *sf_tri;
int totfilltri;

View File

@@ -2140,16 +2140,22 @@ static void psys_update_effectors(ParticleSimulationData *sim)
precalc_guides(sim, sim->psys->effectors);
}
static void integrate_particle(ParticleSettings *part, ParticleData *pa, float dtime, float *external_acceleration, void (*force_func)(void *forcedata, ParticleKey *state, float *force, float *impulse), void *forcedata)
static void integrate_particle(ParticleSettings *part, ParticleData *pa, float dtime, float *external_acceleration,
void (*force_func)(void *forcedata, ParticleKey *state, float *force, float *impulse),
void *forcedata)
{
#define ZERO_F43 {{0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f}}
ParticleKey states[5];
float force[3],acceleration[3],impulse[3],dx[4][3],dv[4][3],oldpos[3];
float force[3], acceleration[3], impulse[3], dx[4][3] = ZERO_F43, dv[4][3] = ZERO_F43, oldpos[3];
float pa_mass= (part->flag & PART_SIZEMASS ? part->mass * pa->size : part->mass);
int i, steps=1;
int integrator = part->integrator;
#undef ZERO_F43
copy_v3_v3(oldpos, pa->state.co);
/* Verlet integration behaves strangely with moving emitters, so do first step with euler. */
if (pa->prev_state.time < 0.f && integrator == PART_INT_VERLET)
integrator = PART_INT_EULER;

View File

@@ -55,8 +55,8 @@ void bmo_extrude_discrete_faces_exec(BMesh *bm, BMOperator *op)
BMIter liter, liter2;
BMFace *f, *f2, *f3;
BMLoop *l, *l2, *l3, *l4, *l_tmp;
BMEdge **edges = NULL, *e, *laste;
BMVert *v, *lastv, *firstv;
BMEdge **edges = NULL, *e, *laste = NULL;
BMVert *v = NULL, *lastv, *firstv;
BLI_array_declare(edges);
int i;

View File

@@ -178,6 +178,7 @@ static void symm_split_asymmetric_edges(Symm *symm)
plane_co[symm->axis][2],
&lambda, TRUE);
BLI_assert(r);
(void)r;
madd_v3_v3v3fl(co, e->v1->co, edge_dir, lambda);
co[symm->axis] = 0;

View File

@@ -494,10 +494,10 @@ void bmo_rotate_uvs_exec(BMesh *bm, BMOperator *op)
BMO_ITER (fs, &fs_iter, op->slots_in, "faces", BM_FACE) {
if (CustomData_has_layer(&(bm->ldata), CD_MLOOPUV)) {
if (use_ccw == FALSE) { /* same loops direction */
BMLoop *lf; /* current face loops */
MLoopUV *f_luv; /* first face loop uv */
float p_uv[2]; /* previous uvs */
float t_uv[2]; /* tmp uvs */
BMLoop *lf; /* current face loops */
MLoopUV *f_luv = NULL; /* first face loop uv */
float p_uv[2] = {0.0f, 0.0f}; /* previous uvs */
float t_uv[2]; /* tmp uvs */
int n = 0;
BM_ITER_ELEM (lf, &l_iter, fs, BM_LOOPS_OF_FACE) {
@@ -518,10 +518,10 @@ void bmo_rotate_uvs_exec(BMesh *bm, BMOperator *op)
copy_v2_v2(f_luv->uv, p_uv);
}
else { /* counter loop direction */
BMLoop *lf; /* current face loops */
MLoopUV *p_luv; /* previous loop uv */
MLoopUV *luv;
float t_uv[2]; /* current uvs */
BMLoop *lf; /* current face loops */
MLoopUV *p_luv; /* previous loop uv */
MLoopUV *luv = NULL;
float t_uv[2] = {0.0f, 0.0f}; /* current uvs */
int n = 0;
BM_ITER_ELEM (lf, &l_iter, fs, BM_LOOPS_OF_FACE) {
@@ -599,10 +599,10 @@ void bmo_rotate_colors_exec(BMesh *bm, BMOperator *op)
BMO_ITER (fs, &fs_iter, op->slots_in, "faces", BM_FACE) {
if (CustomData_has_layer(&(bm->ldata), CD_MLOOPCOL)) {
if (use_ccw == FALSE) { /* same loops direction */
BMLoop *lf; /* current face loops */
MLoopCol *f_lcol; /* first face loop color */
MLoopCol p_col; /* previous color */
MLoopCol t_col; /* tmp color */
BMLoop *lf; /* current face loops */
MLoopCol *f_lcol = NULL; /* first face loop color */
MLoopCol p_col; /* previous color */
MLoopCol t_col; /* tmp color */
int n = 0;
BM_ITER_ELEM (lf, &l_iter, fs, BM_LOOPS_OF_FACE) {
@@ -623,10 +623,10 @@ void bmo_rotate_colors_exec(BMesh *bm, BMOperator *op)
*f_lcol = p_col;
}
else { /* counter loop direction */
BMLoop *lf; /* current face loops */
MLoopCol *p_lcol; /* previous loop color */
MLoopCol *lcol;
MLoopCol t_col; /* current color */
BMLoop *lf; /* current face loops */
MLoopCol *p_lcol; /* previous loop color */
MLoopCol *lcol = NULL;
MLoopCol t_col; /* current color */
int n = 0;
BM_ITER_ELEM (lf, &l_iter, fs, BM_LOOPS_OF_FACE) {

View File

@@ -381,6 +381,8 @@ static void offset_in_two_planes(EdgeHalf *e1, EdgeHalf *e2, EdgeHalf *emid,
int iret;
BLI_assert(f1 != NULL && f2 != NULL);
(void)f1;
(void)f2;
/* get direction vectors for two offset lines */
sub_v3_v3v3(dir1, v->co, BM_edge_other_vert(e1->e, v)->co);
@@ -879,6 +881,7 @@ static void bevel_build_rings(BMesh *bm, BevVert *bv)
ns = vm->seg;
ns2 = ns / 2;
BLI_assert(n > 2 && ns > 1);
(void)n;
/* Make initial rings, going between points on neighbors.
* After this loop, will have coords for all (i, r, k) where
* BoundVert for i has a bevel, 0 <= r <= ns2, 0 <= k <= ns */

View File

@@ -703,6 +703,7 @@ static int bm_edge_collapse(BMesh *bm, BMEdge *e_clear, BMVert *v_clear, int r_e
ok = BM_edge_loop_pair(e_clear, &l_a, &l_b);
BLI_assert(ok == TRUE);
(void)ok;
BLI_assert(l_a->f->len == 3);
BLI_assert(l_b->f->len == 3);

View File

@@ -139,7 +139,7 @@ Mesh *bc_to_mesh_apply_modifiers(Scene *scene, Object *ob, BC_export_mesh_type e
{
Mesh *tmpmesh;
CustomDataMask mask = CD_MASK_MESH;
DerivedMesh *dm;
DerivedMesh *dm = NULL;
switch (export_mesh_type) {
case BC_MESH_TYPE_VIEW: {
dm = mesh_create_derived_view(scene, ob, mask);
@@ -151,7 +151,7 @@ Mesh *bc_to_mesh_apply_modifiers(Scene *scene, Object *ob, BC_export_mesh_type e
}
}
tmpmesh = BKE_mesh_add("ColladaMesh"); // name is not important here
tmpmesh = BKE_mesh_add("ColladaMesh"); // name is not important here
DM_to_mesh(dm, tmpmesh, ob);
dm->release(dm);
return tmpmesh;

View File

@@ -39,7 +39,7 @@ void ScaleNode::convertToOperations(ExecutionSystem *graph, CompositorContext *c
InputSocket *inputXSocket = this->getInputSocket(1);
InputSocket *inputYSocket = this->getInputSocket(2);
OutputSocket *outputSocket = this->getOutputSocket(0);
BaseScaleOperation *scaleoperation;
BaseScaleOperation *scaleoperation = NULL;
bNode *bnode = this->getbNode();
switch (bnode->custom1) {

View File

@@ -2084,19 +2084,19 @@ void uiTemplateColorPicker(uiLayout *layout, PointerRNA *ptr, const char *propna
PropertyRNA *prop = RNA_struct_find_property(ptr, propname);
uiBlock *block = uiLayoutGetBlock(layout);
uiLayout *col, *row;
uiBut *but;
uiBut *but = NULL;
float softmin, softmax, step, precision;
if (!prop) {
RNA_warning("property not found: %s.%s", RNA_struct_identifier(ptr->type), propname);
return;
}
RNA_property_float_ui_range(ptr, prop, &softmin, &softmax, &step, &precision);
col = uiLayoutColumn(layout, TRUE);
row = uiLayoutRow(col, TRUE);
switch (U.color_picker_type) {
case USER_CP_CIRCLE:
but = uiDefButR_prop(block, HSVCIRCLE, 0, "", 0, 0, WHEEL_SIZE, WHEEL_SIZE, ptr, prop,
@@ -2115,7 +2115,6 @@ void uiTemplateColorPicker(uiLayout *layout, PointerRNA *ptr, const char *propna
-1, 0.0, 0.0, UI_GRAD_HV, 0, "");
break;
}
if (lock) {
but->flag |= UI_BUT_COLOR_LOCK;
@@ -2133,7 +2132,6 @@ void uiTemplateColorPicker(uiLayout *layout, PointerRNA *ptr, const char *propna
if (value_slider) {
switch (U.color_picker_type) {
case USER_CP_CIRCLE:
uiItemS(row);
@@ -2156,7 +2154,6 @@ void uiTemplateColorPicker(uiLayout *layout, PointerRNA *ptr, const char *propna
-1, softmin, softmax, UI_GRAD_HV + 3, 0, "");
break;
}
}
}

View File

@@ -2367,8 +2367,8 @@ static void createTransUVs(bContext *C, TransInfo *t)
BMFace *efa;
BMLoop *l;
BMIter iter, liter;
UvElementMap *elementmap;
char *island_enabled;
UvElementMap *elementmap = NULL;
char *island_enabled = NULL;
int count = 0, countsel = 0, count_rejected = 0;
int propmode = t->flag & T_PROP_EDIT;
int propconnected = t->flag & T_PROP_CONNECTED;

View File

@@ -232,7 +232,7 @@ static ParamHandle *construct_param_handle(Scene *scene, Object *ob, BMEditMesh
BLI_srand(0);
BM_ITER_MESH (efa, &iter, em->bm, BM_FACES_OF_MESH) {
ScanFillVert *sf_vert, *sf_vert_last, *sf_vert_first;
ScanFillVert *sf_vert = NULL, *sf_vert_last, *sf_vert_first;
ScanFillFace *sf_tri;
ParamKey key, vkeys[4];
ParamBool pin[4], select[4];

View File

@@ -196,7 +196,7 @@ void IMB_buffer_byte_from_float(uchar *rect_to, const float *rect_from,
{
float tmp[4];
int x, y;
DitherContext *di;
DitherContext *di = NULL;
/* we need valid profiles */
BLI_assert(profile_to != IB_PROFILE_NONE);

View File

@@ -242,7 +242,7 @@ static void exec_output_file_singlelayer(RenderData *rd, bNode *node, bNodeStack
ImageFormatData *format = (sockdata->use_node_format ? &nimf->format : &sockdata->format);
char path[FILE_MAX];
char filename[FILE_MAX];
CompBuf *cbuf;
CompBuf *cbuf = NULL;
ImBuf *ibuf;
switch (format->planes) {