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-27 10:55:20 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-07-27 10:55:20 +0400
commit48a64ffa702b0b7599aa8d8071d4a2265e9ba122 (patch)
tree38021e87e4ead192c8f4d2c1cfdf1d81c97bfcc5
parent955ba3f7fb5bca6d454ee6a1158cbdc094d6d060 (diff)
more minor warning cleanups and improve error reporting if text fails to save.
-rw-r--r--source/blender/blenkernel/intern/seqeffects.c2
-rw-r--r--source/blender/blenkernel/intern/text.c2
-rw-r--r--source/blender/editors/armature/editarmature.c2
-rw-r--r--source/blender/editors/space_node/node_draw.c13
-rw-r--r--source/blender/editors/space_sequencer/sequencer_add.c6
-rw-r--r--source/blender/editors/space_text/text_ops.c21
-rw-r--r--source/blender/gpu/intern/gpu_material.c2
7 files changed, 27 insertions, 21 deletions
diff --git a/source/blender/blenkernel/intern/seqeffects.c b/source/blender/blenkernel/intern/seqeffects.c
index fbb5a77fa04..8c19b0c15c3 100644
--- a/source/blender/blenkernel/intern/seqeffects.c
+++ b/source/blender/blenkernel/intern/seqeffects.c
@@ -2373,7 +2373,7 @@ static void RVBlurBitmap2_float ( float* map, int width,int height,
/* Blancmange (bmange@airdmhor.gen.nz) */
k = -1.0f/(2.0f*(float)M_PI*blur*blur);
- fval=0;
+
for (ix = 0;ix< halfWidth;ix++){
weight = (float)exp(k*(ix*ix));
filter[halfWidth - ix] = weight;
diff --git a/source/blender/blenkernel/intern/text.c b/source/blender/blenkernel/intern/text.c
index 56723476251..2c507370288 100644
--- a/source/blender/blenkernel/intern/text.c
+++ b/source/blender/blenkernel/intern/text.c
@@ -1423,6 +1423,8 @@ void txt_insert_buf(Text *text, const char *in_buffer)
}
undoing= u;
+
+ (void)count;
}
/******************/
diff --git a/source/blender/editors/armature/editarmature.c b/source/blender/editors/armature/editarmature.c
index 20352206121..628cdbf21e9 100644
--- a/source/blender/editors/armature/editarmature.c
+++ b/source/blender/editors/armature/editarmature.c
@@ -1478,10 +1478,8 @@ static int armature_select_linked_invoke(bContext *C, wmOperator *op, wmEvent *e
bArmature *arm;
EditBone *bone, *curBone, *next;
int extend= RNA_boolean_get(op->ptr, "extend");
- ARegion *ar;
Object *obedit= CTX_data_edit_object(C);
arm= obedit->data;
- ar= CTX_wm_region(C);
view3d_operator_needs_opengl(C);
diff --git a/source/blender/editors/space_node/node_draw.c b/source/blender/editors/space_node/node_draw.c
index cd1fa5c16a7..950b3c72fe7 100644
--- a/source/blender/editors/space_node/node_draw.c
+++ b/source/blender/editors/space_node/node_draw.c
@@ -781,14 +781,15 @@ static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bN
iconbutw, UI_UNIT_Y, NULL, 0.0, 0.0, 1.0, 0.5, "");
}
{ /* always hide/reveal unused sockets */
- int shade;
-
- iconofs-=iconbutw;
// XXX re-enable
- /*if(node_has_hidden_sockets(node))
+ /* int shade;
+ if(node_has_hidden_sockets(node))
shade= -40;
- else*/
- shade= -90;
+ else
+ shade= -90; */
+
+ iconofs-=iconbutw;
+
uiDefIconBut(node->block, LABEL, B_REDR, ICON_PLUS, iconofs, rct->ymax-NODE_DY,
iconbutw, UI_UNIT_Y, NULL, 0.0, 0.0, 1.0, 0.5, "");
}
diff --git a/source/blender/editors/space_sequencer/sequencer_add.c b/source/blender/editors/space_sequencer/sequencer_add.c
index f6e3dc3dd0a..36e334990cb 100644
--- a/source/blender/editors/space_sequencer/sequencer_add.c
+++ b/source/blender/editors/space_sequencer/sequencer_add.c
@@ -303,7 +303,7 @@ static int sequencer_add_generic_strip_exec(bContext *C, wmOperator *op, SeqLoad
Scene *scene= CTX_data_scene(C); /* only for sound */
Editing *ed= seq_give_editing(scene, TRUE);
SeqLoadInfo seq_load;
- Sequence *seq;
+ /* Sequence *seq; */ /* UNUSED */
int tot_files;
seq_load_operator_info(&seq_load, op);
@@ -324,13 +324,13 @@ static int sequencer_add_generic_strip_exec(bContext *C, wmOperator *op, SeqLoad
RNA_string_get(&itemptr, "name", file_only);
BLI_join_dirfile(seq_load.path, sizeof(seq_load.path), dir_only, file_only);
- seq= seq_load_func(C, ed->seqbasep, &seq_load);
+ /* seq= */ seq_load_func(C, ed->seqbasep, &seq_load);
}
RNA_END;
}
else {
/* single file */
- seq= seq_load_func(C, ed->seqbasep, &seq_load);
+ /* seq= */ seq_load_func(C, ed->seqbasep, &seq_load);
}
if (seq_load.tot_success==0) {
diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c
index 2bd6bd624df..13eb24ed1f2 100644
--- a/source/blender/editors/space_text/text_ops.c
+++ b/source/blender/editors/space_text/text_ops.c
@@ -36,6 +36,7 @@
#include <string.h>
#include <ctype.h> /* ispunct */
#include <sys/stat.h>
+#include <errno.h>
#include "MEM_guardedalloc.h"
@@ -449,15 +450,14 @@ static void txt_write_file(Text *text, ReportList *reports)
FILE *fp;
TextLine *tmp;
struct stat st;
- int res;
- char file[FILE_MAXDIR+FILE_MAXFILE];
+ char filepath[FILE_MAXDIR+FILE_MAXFILE];
- BLI_strncpy(file, text->name, FILE_MAXDIR+FILE_MAXFILE);
- BLI_path_abs(file, G.main->name);
+ BLI_strncpy(filepath, text->name, FILE_MAXDIR+FILE_MAXFILE);
+ BLI_path_abs(filepath, G.main->name);
- fp= fopen(file, "w");
+ fp= fopen(filepath, "w");
if(fp==NULL) {
- BKE_report(reports, RPT_ERROR, "Unable to save file.");
+ BKE_reportf(reports, RPT_ERROR, "Unable to save \"%s\": %s.", filepath, errno ? strerror(errno) : "Unknown error writing file");
return;
}
@@ -471,8 +471,13 @@ static void txt_write_file(Text *text, ReportList *reports)
fclose (fp);
- res= stat(file, &st);
- text->mtime= st.st_mtime;
+ if(stat(filepath, &st) == 0) {
+ text->mtime= st.st_mtime;
+ }
+ else {
+ text->mtime= 0;
+ BKE_reportf(reports, RPT_WARNING, "Unable to stat \"%s\": %s.", filepath, errno ? strerror(errno) : "Unknown error starrng file");
+ }
if(text->flags & TXT_ISDIRTY)
text->flags ^= TXT_ISDIRTY;
diff --git a/source/blender/gpu/intern/gpu_material.c b/source/blender/gpu/intern/gpu_material.c
index 3804aad6848..806c70d841f 100644
--- a/source/blender/gpu/intern/gpu_material.c
+++ b/source/blender/gpu/intern/gpu_material.c
@@ -671,7 +671,7 @@ static void shade_one_light(GPUShadeInput *shi, GPUShadeResult *shr, GPULamp *la
i = is;
GPU_link(mat, "shade_visifac", i, visifac, shi->refl, &i);
- vn = shi->vn;
+
/*if(ma->mode & MA_TANGENT_VN)
GPU_link(mat, "shade_tangent_v_spec", GPU_attribute(CD_TANGENT, ""), &vn);*/