fix for checking char arrays against NULL, instead check their first character. also...
authorCampbell Barton <ideasman42@gmail.com>
Tue, 16 Jul 2013 11:42:07 +0000 (11:42 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 16 Jul 2013 11:42:07 +0000 (11:42 +0000)
intern/smoke/CMakeLists.txt
source/blender/blenkernel/intern/smoke.c
source/blender/blenlib/intern/fileops.c
source/blender/editors/include/ED_armature.h
source/blender/editors/object/object_add.c
source/blender/editors/render/render_internal.c
source/blender/editors/space_clip/tracking_ops.c
source/blender/editors/space_outliner/outliner_select.c
source/blender/editors/space_outliner/outliner_tree.c
source/blender/editors/space_sequencer/sequencer_edit.c
source/blender/editors/space_view3d/view3d_draw.c

index b6338f9..2ca423d 100644 (file)
@@ -95,7 +95,7 @@ endif()
 
 if(WITH_FFTW3)
        add_definitions(-DWITH_FFTW3)
-       list(APPEND INC
+       list(APPEND INC_SYS
                ${FFTW3_INCLUDE_DIRS}
        )
 endif()
index 9fa4cc2..b2c0a45 100644 (file)
@@ -2102,7 +2102,7 @@ static void update_flowsfluids(Scene *scene, Object *ob, SmokeDomainSettings *sd
                        /* sample subframes */
                        else {
                                int scene_frame = scene->r.cfra;
-                               float scene_subframe = scene->r.subframe;
+                               // float scene_subframe = scene->r.subframe;  // UNUSED
                                int subframe;
                                for (subframe = 0; subframe <= subframes; subframe++) {
                                        EmissionMap em_temp = {0};
index 26fe0f2..26b9e08 100644 (file)
@@ -199,7 +199,7 @@ bool BLI_file_touch(const char *file)
 {
        FILE *f = BLI_fopen(file, "r+b");
        if (f != NULL) {
-               char c = getc(f);
+               int c = getc(f);
                rewind(f);
                putc(c, f);
        }
index 32436eb..9b9a4c1 100644 (file)
@@ -155,7 +155,7 @@ void undo_push_armature(struct bContext *C, const char *name);
 
 /* low level selection functions which handle */
 int  ED_armature_ebone_selectflag_get(const EditBone *ebone);
-void ED_armature_ebone_selectflag_set(EditBone *ebone, const int flag);
+void ED_armature_ebone_selectflag_set(EditBone *ebone, int flag);
 void ED_armature_ebone_select_set(EditBone *ebone, bool select);
 void ED_armature_ebone_selectflag_enable(EditBone *ebone, int flag);
 void ED_armature_ebone_selectflag_disable(EditBone *ebone, int flag);
index f563451..5b100d7 100644 (file)
@@ -226,7 +226,7 @@ float ED_object_new_primitive_matrix(bContext *C, Object *obedit,
                return dia;
        }
 
-       return 1.0f;
+       // return 1.0f;
 }
 
 /********************* Add Object Operator ********************/
index b9653da..51bf137 100644 (file)
@@ -831,9 +831,10 @@ static void render_view3d_renderinfo_cb(void *rjp, RenderStats *rs)
        RenderPreview *rp = rjp;
 
        /* during render, rv3d->engine can get freed */
-       if (rp->rv3d->render_engine == NULL)
+       if (rp->rv3d->render_engine == NULL) {
                *rp->stop = 1;
-       else if (rp->engine->text) {
+       }
+       else if (rp->engine->text[0]) {
                make_renderinfo_string(rs, rp->scene, false, rp->engine->text);
        
                /* make jobs timer to send notifier */
index 49b16a6..7899f9f 100644 (file)
@@ -420,7 +420,6 @@ static int mouse_on_slide_zone(SpaceClip *sc, MovieTrackingMarker *marker,
                                float padding, int width, int height)
 {
        const float size = 12.0f;
-       int inside = 0;
        float min[2], max[2];
        float dx, dy;
 
@@ -445,8 +444,6 @@ static int mouse_on_slide_zone(SpaceClip *sc, MovieTrackingMarker *marker,
 
        return IN_RANGE_INCL(co[0], slide_zone[0] - dx, slide_zone[0] + dx) &&
               IN_RANGE_INCL(co[1], slide_zone[1] - dy, slide_zone[1] + dy);
-
-       return inside;
 }
 
 static int mouse_on_corner(SpaceClip *sc, MovieTrackingMarker *marker,
index 3f06db2..9720d98 100644 (file)
@@ -704,7 +704,7 @@ static int tree_element_active_sequence_dup(Scene *scene, TreeElement *te, TreeS
 // XXX select_single_seq(seq, 1);
        p = ed->seqbasep->first;
        while (p) {
-               if ((!p->strip) || (!p->strip->stripdata) || (!p->strip->stripdata->name)) {
+               if ((!p->strip) || (!p->strip->stripdata) || (p->strip->stripdata->name[0] == '\0')) {
                        p = p->next;
                        continue;
                }
index b5c74ee..08d32de 100644 (file)
@@ -957,7 +957,7 @@ static TreeElement *outliner_add_element(SpaceOops *soops, ListBase *lb, void *i
        else if (type == TSE_SEQ_STRIP) {
                Strip *strip = (Strip *)idv;
 
-               if (strip->dir)
+               if (strip->dir[0] != '\0')
                        te->name = strip->dir;
                else
                        te->name = IFACE_("Strip None");
@@ -1171,7 +1171,7 @@ static void outliner_add_seq_dup(SpaceOops *soops, Sequence *seq, TreeElement *t
 
        p = seq;
        while (p) {
-               if ((!p->strip) || (!p->strip->stripdata) || (!p->strip->stripdata->name)) {
+               if ((!p->strip) || (!p->strip->stripdata) || (p->strip->stripdata->name[0] == '\0')) {
                        p = p->next;
                        continue;
                }
index ff7220e..a4dea4e 100644 (file)
@@ -551,6 +551,7 @@ int seq_effect_find_selected(Scene *scene, Sequence *activeseq, int type, Sequen
                        }
                        if (seq1 == NULL) seq1 = seq2;
                        if (seq3 == NULL) seq3 = seq2;
+                       /* fall-through */
                case 2:
                        if (seq1 == NULL || seq2 == NULL) {
                                *error_str = N_("2 selected sequence strips are needed");
index 0a2358a..61532e7 100644 (file)
@@ -3033,7 +3033,7 @@ static void view3d_main_area_draw_engine_info(View3D *v3d, RegionView3D *rv3d, A
 {
        float fill_color[4] = {0.0f, 0.0f, 0.0f, 0.25f};
 
-       if (!rv3d->render_engine || !rv3d->render_engine->text)
+       if (!rv3d->render_engine || !rv3d->render_engine->text[0])
                return;
        
        if (render_border) {