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-09-12 04:00:21 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-09-12 04:00:21 +0400
commit2827ee26e5fafbb76b1cc4f63e5feaca513cd4a9 (patch)
tree843cc384fd7401df88ef0523c19dc63865f3223c /source/blender/editors
parent8f9fa6a400d0a3e38206532c17d8bb00f0ceb51e (diff)
fix for ntreeGPUMaterialNodes(), using uninitialized exec pointer.
also commented some set-but-unused variables.
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/interface/interface_layout.c4
-rw-r--r--source/blender/editors/space_file/filelist.c4
-rw-r--r--source/blender/editors/space_nla/nla_select.c2
-rw-r--r--source/blender/editors/transform/transform.c12
4 files changed, 16 insertions, 6 deletions
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c
index 3e3e6da188e..59bbe67a8e2 100644
--- a/source/blender/editors/interface/interface_layout.c
+++ b/source/blender/editors/interface/interface_layout.c
@@ -334,7 +334,7 @@ static void ui_layer_but_cb(bContext *C, void *arg_but, void *arg_index)
}
/* create buttons for an item with an RNA array */
-static void ui_item_array(uiLayout *layout, uiBlock *block, const char *name, int icon, PointerRNA *ptr, PropertyRNA *prop, int len, int x, int y, int w, int h, int expand, int slider, int toggle, int icon_only)
+static void ui_item_array(uiLayout *layout, uiBlock *block, const char *name, int icon, PointerRNA *ptr, PropertyRNA *prop, int len, int x, int y, int w, int UNUSED(h), int expand, int slider, int toggle, int icon_only)
{
uiStyle *style= layout->root->style;
uiBut *but;
@@ -407,7 +407,7 @@ static void ui_item_array(uiLayout *layout, uiBlock *block, const char *name, in
if (totdim != 2) return; /* only 2D matrices supported in UI so far */
w /= dim_size[0];
- h /= dim_size[1];
+ /* h /= dim_size[1]; */ /* UNUSED */
for(a=0; a<len; a++) {
col= a % dim_size[0];
diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c
index 7382188d62a..c7ada4a5801 100644
--- a/source/blender/editors/space_file/filelist.c
+++ b/source/blender/editors/space_file/filelist.c
@@ -1158,8 +1158,8 @@ void filelist_from_main(struct FileList *filelist)
/* XXXXX TODO: if databrowse F4 or append/link filelist->hide_parent has to be set */
if (!filelist->hide_parent) filelist->numfiles+= 1;
- filelist->filelist= (struct direntry *)malloc(filelist->numfiles * sizeof(struct direntry));
-
+ filelist->filelist= filelist->numfiles > 0 ? (struct direntry *)malloc(filelist->numfiles * sizeof(struct direntry)) : NULL;
+
files = filelist->filelist;
if (!filelist->hide_parent) {
diff --git a/source/blender/editors/space_nla/nla_select.c b/source/blender/editors/space_nla/nla_select.c
index c33316620eb..e9b45da6bce 100644
--- a/source/blender/editors/space_nla/nla_select.c
+++ b/source/blender/editors/space_nla/nla_select.c
@@ -226,7 +226,7 @@ static void borderselect_nla_strips (bAnimContext *ac, rcti rect, short mode, sh
SpaceNla *snla = (SpaceNla *)ac->sl;
View2D *v2d= &ac->ar->v2d;
rctf rectf;
- float ymin=(float)(-NLACHANNEL_HEIGHT(snla)), ymax=0;
+ float ymin /* =(float)(-NLACHANNEL_HEIGHT(snla)) */ /* UNUSED */, ymax=0;
/* convert border-region to view coordinates */
UI_view2d_region_to_view(v2d, rect.xmin, rect.ymin+2, &rectf.xmin, &rectf.ymin);
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c
index 1796bd4e928..5e2b1455b28 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -5423,9 +5423,13 @@ static void doAnimEdit_SnapFrame(TransInfo *t, TransData *td, TransData2D *td2d,
{
/* snap key to nearest frame? */
if (autosnap == SACTSNAP_FRAME) {
+
+#if 0 /* 'doTime' disabled for now */
+
const Scene *scene= t->scene;
const short doTime= 0; //getAnimEdit_DrawTime(t); // NOTE: this works, but may be confusing behaviour given the option's label, hence disabled
const double secf= FPS;
+#endif
double val;
/* convert frame to nla-action time (if needed) */
@@ -5434,11 +5438,17 @@ static void doAnimEdit_SnapFrame(TransInfo *t, TransData *td, TransData2D *td2d,
else
val= *(td->val);
+#if 0 /* 'doTime' disabled for now */
+
/* do the snapping to nearest frame/second */
- if (doTime)
+ if (doTime) {
val= (float)( floor((val/secf) + 0.5f) * secf );
+ }
else
+#endif
+ {
val= (float)( floor(val+0.5f) );
+ }
/* convert frame out of nla-action time */
if (adt)