Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-07-30 13:24:10 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-07-30 13:24:10 +0400
commitf66ec41b6a3b74f079c19494357c268e1ab39e85 (patch)
treedab6b2a879fc31ad1ae8a2e187679646b9d01a18
parent6a27da310c61b3372d565060506221a5afb9fe43 (diff)
quiet some compiler warnings & fix possible (but unlikely) crash.
also added GPLv2+ header to resources.c.
-rw-r--r--source/blender/blenlib/intern/BLI_args.c6
-rw-r--r--source/blender/editors/curve/editcurve.c15
-rw-r--r--source/blender/editors/interface/interface_anim.c24
-rw-r--r--source/blender/editors/interface/resources.c7
-rw-r--r--source/blender/editors/object/object_relations.c6
5 files changed, 44 insertions, 14 deletions
diff --git a/source/blender/blenlib/intern/BLI_args.c b/source/blender/blenlib/intern/BLI_args.c
index 7bc93a3d3a0..5f31565d65b 100644
--- a/source/blender/blenlib/intern/BLI_args.c
+++ b/source/blender/blenlib/intern/BLI_args.c
@@ -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;
}
}
diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c
index 06d88b16fa8..8b9477adf92 100644
--- a/source/blender/editors/curve/editcurve.c
+++ b/source/blender/editors/curve/editcurve.c
@@ -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;
}
diff --git a/source/blender/editors/interface/interface_anim.c b/source/blender/editors/interface/interface_anim.c
index 75e7ee701a2..03003173e20 100644
--- a/source/blender/editors/interface/interface_anim.c
+++ b/source/blender/editors/interface/interface_anim.c
@@ -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
*/
diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c
index 56ef5e9e8cc..2b4003c7af0 100644
--- a/source/blender/editors/interface/resources.c
+++ b/source/blender/editors/interface/resources.c
@@ -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>
diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c
index f21241b6e7a..0fb7cf8b640 100644
--- a/source/blender/editors/object/object_relations.c
+++ b/source/blender/editors/object/object_relations.c
@@ -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;
}