quiet some compiler warnings & fix possible (but unlikely) crash.

also added GPLv2+ header to resources.c.
This commit is contained in:
Campbell Barton 2011-07-30 09:24:10 +00:00
parent 6a27da310c
commit f66ec41b6a
5 changed files with 44 additions and 14 deletions

@ -290,8 +290,10 @@ void BLI_argsParse(struct bArgs *ba, int pass, BA_ArgCallback default_cb, void *
}
i += retval;
} else if (retval == -1){
if (a->key->pass != -1)
ba->passes[i] = pass;
if (a) {
if (a->key->pass != -1)
ba->passes[i] = pass;
}
break;
}
}

@ -6544,12 +6544,15 @@ Nurb *add_nurbs_primitive(bContext *C, float mat[4][4], int type, int newob)
BLI_assert(!"invalid nurbs type");
return NULL;
}
/* always do: */
nu->flag |= CU_SMOOTH;
test2DNurb(nu);
BLI_assert(nu != NULL);
if(nu) { /* should always be set */
nu->flag |= CU_SMOOTH;
test2DNurb(nu);
}
return nu;
}

@ -1,3 +1,27 @@
/*
* $Id:
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Contributor(s):
*
* ***** END GPL LICENSE BLOCK *****
*/
/** \file blender/editors/interface/interface_anim.c
* \ingroup edinterface
*/

@ -1,6 +1,3 @@
/** \file blender/editors/interface/resources.c
* \ingroup edinterface
*/
/*
* $Id$
*
@ -33,6 +30,10 @@
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
/** \file blender/editors/interface/resources.c
* \ingroup edinterface
*/
#include <math.h>
#include <stdlib.h>
#include <string.h>

@ -1096,7 +1096,7 @@ static int move_to_layer_exec(bContext *C, wmOperator *op)
Scene *scene= CTX_data_scene(C);
View3D *v3d= CTX_wm_view3d(C);
unsigned int lay, local;
int islamp= 0;
/* int islamp= 0; */ /* UNUSED */
lay= move_to_layer_init(C, op);
lay &= 0xFFFFFF;
@ -1112,7 +1112,7 @@ static int move_to_layer_exec(bContext *C, wmOperator *op)
base->object->lay= lay;
base->object->flag &= ~SELECT;
base->flag &= ~SELECT;
if(base->object->type==OB_LAMP) islamp= 1;
/* if(base->object->type==OB_LAMP) islamp= 1; */
}
CTX_DATA_END;
}
@ -1124,7 +1124,7 @@ static int move_to_layer_exec(bContext *C, wmOperator *op)
local= base->lay & 0xFF000000;
base->lay= lay + local;
base->object->lay= lay;
if(base->object->type==OB_LAMP) islamp= 1;
/* if(base->object->type==OB_LAMP) islamp= 1; */
}
CTX_DATA_END;
}