2.5: various warning fixes. There was one actual bug in a few different
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Fri, 26 Dec 2008 14:19:25 +0000 (14:19 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Fri, 26 Dec 2008 14:19:25 +0000 (14:19 +0000)
places, using sprintf with strings like ID names as the format string
(note that this name can contain a % character).

15 files changed:
source/blender/blenkernel/intern/BME_tools.c
source/blender/blenkernel/intern/anim.c
source/blender/blenkernel/intern/collision.c
source/blender/blenkernel/intern/displist.c
source/blender/blenkernel/intern/exotic.c
source/blender/blenkernel/intern/image.c
source/blender/blenloader/intern/readfile.c
source/blender/editors/space_action/action_draw.c
source/blender/editors/space_node/node_draw.c
source/blender/editors/space_outliner/outliner.c
source/blender/editors/space_view3d/drawobject.c
source/blender/editors/space_view3d/view3d_intern.h
source/blender/render/intern/source/pipeline.c
source/blender/yafray/intern/export_File.cpp
source/blender/yafray/intern/export_Plugin.cpp

index 8aaa7aca0234f2e994a60dd23bb59b656a13b715..3ddd790e90b7f0f164f5f2bcfcd0235da0112630 100644 (file)
@@ -205,6 +205,7 @@ static BME_Poly *BME_split_face(BME_Mesh *bm, BME_Poly *f, BME_Vert *v1, BME_Ver
 }
 
 
+#if 0
 static void BME_data_interp_from_verts(BME_Mesh *bm, BME_Vert *v1, BME_Vert *v2, BME_Vert *v, float fac)
 {
        void *src[2];
@@ -217,6 +218,7 @@ static void BME_data_interp_from_verts(BME_Mesh *bm, BME_Vert *v1, BME_Vert *v2,
                CustomData_bmesh_interp(&bm->vdata, src, w, NULL, 2, v->data);
        }
 }
+#endif
 
 
 static void BME_data_facevert_edgesplit(BME_Mesh *bm, BME_Vert *v1, BME_Vert *v2, BME_Vert *v, BME_Edge *e1, float fac){
index a32737762bedf87c546068ed204e192957b424e1..26afa0967c1a5f5d3ceb2667b6e11e90ad4faed8 100644 (file)
@@ -954,7 +954,7 @@ static Object *find_family_object(Object **obar, char *family, char ch)
        Object *ob;
        int flen;
        
-       if( obar[ch] ) return obar[ch];
+       if( obar[(int)ch] ) return obar[(int)ch];
        
        flen= strlen(family);
        
@@ -966,7 +966,7 @@ static Object *find_family_object(Object **obar, char *family, char ch)
                ob= ob->id.next;
        }
        
-       obar[ch]= ob;
+       obar[(int)ch]= ob;
        
        return ob;
 }
index 9db3dda94eb7ccf293b4ce08605bb045086ad090..4f8068ac252e37dc311d353f083d2f2192c2f0b8 100644 (file)
@@ -591,7 +591,9 @@ CollPair* cloth_collision ( ModifierData *md1, ModifierData *md2, BVHTreeOverlap
        ClothModifierData *clmd = ( ClothModifierData * ) md1;
        CollisionModifierData *collmd = ( CollisionModifierData * ) md2;
        MFace *face1=NULL, *face2 = NULL;
+#ifdef WITH_BULLET
        ClothVertex *verts1 = clmd->clothObject->verts;
+#endif
        double distance = 0;
        float epsilon1 = clmd->coll_parms->epsilon;
        float epsilon2 = BLI_bvhtree_getepsilon ( collmd->bvhtree );
index c71664d09a734a9cdb583815d53f1765028cb10b..3a9e0eb8febf22181989e89f7d337d3fb6cea1f5 100644 (file)
@@ -1454,7 +1454,7 @@ void makeDispListCurveTypes(Object *ob, int forOrco)
                ListBase dlbev;
                float (*originalVerts)[3];
                float (*deformedVerts)[3];
-               int obedit= (G.obedit && G.obedit->data==ob->data && G.obedit->type==OB_CURVE);
+               //XXX int obedit= (G.obedit && G.obedit->data==ob->data && G.obedit->type==OB_CURVE);
                ListBase *nubase= &cu->nurb; //XXX ListBase *nubase = obedit?&editNurb:&cu->nurb;
                int numVerts;
 
index 1570f735fc5d37f3f955e25f55d3ceaed7573fe9..c8648e19c2d96ff7760538847915d11b62289e31 100644 (file)
@@ -2668,10 +2668,10 @@ static void write_videoscape_mesh(Object *ob, char *str)
                }
                for(a=0; a<me->totface; a++, mface++) {
                        if(mface->v4==0) {
-                               fprintf(fp, "3 %d %d %d 0x%x\n", mface->v1, mface->v2, mface->v3, kleur[mface->mat_nr]);
+                               fprintf(fp, "3 %d %d %d 0x%x\n", mface->v1, mface->v2, mface->v3, kleur[(int)mface->mat_nr]);
                        }
                        else {
-                               fprintf(fp, "4 %d %d %d %d 0x%x\n", mface->v1, mface->v2, mface->v3, mface->v4, kleur[mface->mat_nr]);
+                               fprintf(fp, "4 %d %d %d %d 0x%x\n", mface->v1, mface->v2, mface->v3, mface->v4, kleur[(int)mface->mat_nr]);
                        }
                }
 
@@ -3255,7 +3255,7 @@ static void write_mesh_dxf(FILE *fp, Mesh *me)
        
                /* Write a face color */
                if (me->totcol) {
-                       ma= me->mat[mface->mat_nr];
+                       ma= me->mat[(int)mface->mat_nr];
                        if(ma) {
                                sprintf(str,"%d",rgb_to_dxf_col(ma->r,ma->g,ma->b));
                                write_group(62, str); /* Color index */
index de1747e514c42bf00b6d6f6b287f31aa411fa91c..93109b6d0efbec961ffb7f90f81ec44dd0ea0f4b 100644 (file)
@@ -583,6 +583,7 @@ void tag_image_time(Image *ima)
                ima->lastused = (int)PIL_check_seconds_timer();
 }
 
+#if 0
 static void tag_all_images_time() 
 {
        Image *ima;
@@ -595,6 +596,7 @@ static void tag_all_images_time()
                }
        }
 }
+#endif
 
 void free_old_images()
 {
index c7aa86b2bf56bc25c30947316afe8e8b6712afd2..cc4a2d800b9ac03c76575e6827e850baf8eddd09 100644 (file)
@@ -6238,52 +6238,55 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
                                        if (sl->spacetype==SPACE_BUTS) {
                                                SpaceButs *sbuts= (SpaceButs *) sl;
 
-//XXX                                          sbuts->v2d.maxzoom= 1.2f;
-//XXX                                          sbuts->align= 1;        /* horizontal default */
-//XXX                                          
-//XXX                                          if(sbuts->mainb==BUTS_LAMP) {
-//XXX                                                  sbuts->mainb= CONTEXT_SHADING;
-//XXX                                                  sbuts->tab[CONTEXT_SHADING]= TAB_SHADING_LAMP;
-//XXX                                          }
-//XXX                                          else if(sbuts->mainb==BUTS_MAT) {
-//XXX                                                  sbuts->mainb= CONTEXT_SHADING;
-//XXX                                                  sbuts->tab[CONTEXT_SHADING]= TAB_SHADING_MAT;
-//XXX                                          }
-//XXX                                          else if(sbuts->mainb==BUTS_TEX) {
-//XXX                                                  sbuts->mainb= CONTEXT_SHADING;
-//XXX                                                  sbuts->tab[CONTEXT_SHADING]= TAB_SHADING_TEX;
-//XXX                                          }
-//XXX                                          else if(sbuts->mainb==BUTS_ANIM) {
-//XXX                                                  sbuts->mainb= CONTEXT_OBJECT;
-//XXX                                          }
-//XXX                                          else if(sbuts->mainb==BUTS_WORLD) {
-//XXX                                                  sbuts->mainb= CONTEXT_SCENE;
-//XXX                                                  sbuts->tab[CONTEXT_SCENE]= TAB_SCENE_WORLD;
-//XXX                                          }
-//XXX                                          else if(sbuts->mainb==BUTS_RENDER) {
-//XXX                                                  sbuts->mainb= CONTEXT_SCENE;
-//XXX                                                  sbuts->tab[CONTEXT_SCENE]= TAB_SCENE_RENDER;
-//XXX                                          }
-//XXX                                          else if(sbuts->mainb==BUTS_GAME) {
-//XXX                                                  sbuts->mainb= CONTEXT_LOGIC;
-//XXX                                          }
-//XXX                                          else if(sbuts->mainb==BUTS_FPAINT) {
-//XXX                                                  sbuts->mainb= CONTEXT_EDITING;
-//XXX                                          }
-//XXX                                          else if(sbuts->mainb==BUTS_RADIO) {
-//XXX                                                  sbuts->mainb= CONTEXT_SHADING;
-//XXX                                                  sbuts->tab[CONTEXT_SHADING]= TAB_SHADING_RAD;
-//XXX                                          }
-//XXX                                          else if(sbuts->mainb==BUTS_CONSTRAINT) {
-//XXX                                                  sbuts->mainb= CONTEXT_OBJECT;
-//XXX                                          }
-//XXX                                          else if(sbuts->mainb==BUTS_SCRIPT) {
-//XXX                                                  sbuts->mainb= CONTEXT_OBJECT;
-//XXX                                          }
-//XXX                                          else if(sbuts->mainb==BUTS_EDIT) {
-//XXX                                                  sbuts->mainb= CONTEXT_EDITING;
-//XXX                                          }
-//XXX                                          else sbuts->mainb= CONTEXT_SCENE;
+                                               sbuts->v2d.maxzoom= 1.2f;
+                                               sbuts->align= 1;        /* horizontal default */
+                                       
+                                               //XXX
+#if 0
+                                               if(sbuts->mainb==BUTS_LAMP) {
+                                                       sbuts->mainb= CONTEXT_SHADING;
+                                                       sbuts->tab[CONTEXT_SHADING]= TAB_SHADING_LAMP;
+                                               }
+                                               else if(sbuts->mainb==BUTS_MAT) {
+                                                       sbuts->mainb= CONTEXT_SHADING;
+                                                       sbuts->tab[CONTEXT_SHADING]= TAB_SHADING_MAT;
+                                               }
+                                               else if(sbuts->mainb==BUTS_TEX) {
+                                                       sbuts->mainb= CONTEXT_SHADING;
+                                                       sbuts->tab[CONTEXT_SHADING]= TAB_SHADING_TEX;
+                                               }
+                                               else if(sbuts->mainb==BUTS_ANIM) {
+                                                       sbuts->mainb= CONTEXT_OBJECT;
+                                               }
+                                               else if(sbuts->mainb==BUTS_WORLD) {
+                                                       sbuts->mainb= CONTEXT_SCENE;
+                                                       sbuts->tab[CONTEXT_SCENE]= TAB_SCENE_WORLD;
+                                               }
+                                               else if(sbuts->mainb==BUTS_RENDER) {
+                                                       sbuts->mainb= CONTEXT_SCENE;
+                                                       sbuts->tab[CONTEXT_SCENE]= TAB_SCENE_RENDER;
+                                               }
+                                               else if(sbuts->mainb==BUTS_GAME) {
+                                                       sbuts->mainb= CONTEXT_LOGIC;
+                                               }
+                                               else if(sbuts->mainb==BUTS_FPAINT) {
+                                                       sbuts->mainb= CONTEXT_EDITING;
+                                               }
+                                               else if(sbuts->mainb==BUTS_RADIO) {
+                                                       sbuts->mainb= CONTEXT_SHADING;
+                                                       sbuts->tab[CONTEXT_SHADING]= TAB_SHADING_RAD;
+                                               }
+                                               else if(sbuts->mainb==BUTS_CONSTRAINT) {
+                                                       sbuts->mainb= CONTEXT_OBJECT;
+                                               }
+                                               else if(sbuts->mainb==BUTS_SCRIPT) {
+                                                       sbuts->mainb= CONTEXT_OBJECT;
+                                               }
+                                               else if(sbuts->mainb==BUTS_EDIT) {
+                                                       sbuts->mainb= CONTEXT_EDITING;
+                                               }
+                                               else sbuts->mainb= CONTEXT_SCENE;
+#endif
                                        }
                                }
                        }
@@ -8412,7 +8415,6 @@ BlendFileData *blo_read_file_internal(FileData *fd, ReportList *reports)
 {
        BHead *bhead= blo_firstbhead(fd);
        BlendFileData *bfd;
-       FileGlobal *fg = (FileGlobal *)NULL;
 
        bfd= MEM_callocN(sizeof(BlendFileData), "blendfiledata");
        bfd->main= MEM_callocN(sizeof(Main), "main");
@@ -9343,9 +9345,9 @@ static void append_named_part(FileData *fd, Main *mainvar, Scene *scene, char *n
                                        else ob= (Object *)id;
                                        
                                        /* XXX use context to find view3d->lay */
-                                       if((flag & FILE_ACTIVELAY)) {
-                                               scene->lay;
-                                       }
+                                       //if((flag & FILE_ACTIVELAY)) {
+                                       //      scene->lay;
+                                       //}
                                        base->lay= ob->lay;
                                        base->object= ob;
                                        ob->id.us++;
index 38f2fe39a8f1305d83243fa5e8a33466ff7f6333..696188dada4e8e2539a0260ea97f11e5ef1df1c1 100644 (file)
@@ -463,7 +463,7 @@ void draw_channel_names(bAnimContext *ac, SpaceAction *saction, ARegion *ar)
                                                expand= ICON_TRIA_RIGHT;
                                        
                                        sel = SEL_OBJC(base);
-                                       sprintf(name, ob->id.name+2);
+                                       strcpy(name, ob->id.name+2);
                                }
                                        break;
                                case ANIMTYPE_FILLACTD: /* action widget */
@@ -480,7 +480,7 @@ void draw_channel_names(bAnimContext *ac, SpaceAction *saction, ARegion *ar)
                                                expand= ICON_TRIA_RIGHT;
                                        
                                        sel = SEL_ACTC(act);
-                                       sprintf(name, "Action");
+                                       strcpy(name, "Action");
                                }
                                        break;
                                case ANIMTYPE_FILLIPOD: /* ipo (dopesheet) expand widget */
@@ -497,7 +497,7 @@ void draw_channel_names(bAnimContext *ac, SpaceAction *saction, ARegion *ar)
                                                expand = ICON_TRIA_RIGHT;
                                        
                                        //sel = SEL_OBJC(base);
-                                       sprintf(name, "IPO Curves");
+                                       strcpy(name, "IPO Curves");
                                }
                                        break;
                                case ANIMTYPE_FILLCOND: /* constraint channels (dopesheet) expand widget */
@@ -514,7 +514,7 @@ void draw_channel_names(bAnimContext *ac, SpaceAction *saction, ARegion *ar)
                                                expand = ICON_TRIA_RIGHT;
                                                
                                        //sel = SEL_OBJC(base);
-                                       sprintf(name, "Constraints");
+                                       strcpy(name, "Constraints");
                                }
                                        break;
                                case ANIMTYPE_FILLMATD: /* object materials (dopesheet) expand widget */
@@ -530,7 +530,7 @@ void draw_channel_names(bAnimContext *ac, SpaceAction *saction, ARegion *ar)
                                        else
                                                expand = ICON_TRIA_RIGHT;
                                                
-                                       sprintf(name, "Materials");
+                                       strcpy(name, "Materials");
                                }
                                        break;
                                
@@ -549,7 +549,7 @@ void draw_channel_names(bAnimContext *ac, SpaceAction *saction, ARegion *ar)
                                        else
                                                expand = ICON_TRIA_RIGHT;
                                        
-                                       sprintf(name, ma->id.name+2);
+                                       strcpy(name, ma->id.name+2);
                                }
                                        break;
                                case ANIMTYPE_DSLAM: /* lamp (dopesheet) expand widget */
@@ -565,7 +565,7 @@ void draw_channel_names(bAnimContext *ac, SpaceAction *saction, ARegion *ar)
                                        else
                                                expand = ICON_TRIA_RIGHT;
                                        
-                                       sprintf(name, la->id.name+2);
+                                       strcpy(name, la->id.name+2);
                                }
                                        break;
                                case ANIMTYPE_DSCAM: /* camera (dopesheet) expand widget */
@@ -581,7 +581,7 @@ void draw_channel_names(bAnimContext *ac, SpaceAction *saction, ARegion *ar)
                                        else
                                                expand = ICON_TRIA_RIGHT;
                                        
-                                       sprintf(name, ca->id.name+2);
+                                       strcpy(name, ca->id.name+2);
                                }
                                        break;
                                case ANIMTYPE_DSCUR: /* curve (dopesheet) expand widget */
@@ -597,7 +597,7 @@ void draw_channel_names(bAnimContext *ac, SpaceAction *saction, ARegion *ar)
                                        else
                                                expand = ICON_TRIA_RIGHT;
                                        
-                                       sprintf(name, cu->id.name+2);
+                                       strcpy(name, cu->id.name+2);
                                }
                                        break;
                                case ANIMTYPE_DSSKEY: /* shapekeys (dopesheet) expand widget */
@@ -614,7 +614,7 @@ void draw_channel_names(bAnimContext *ac, SpaceAction *saction, ARegion *ar)
                                                expand = ICON_TRIA_RIGHT;
                                                
                                        //sel = SEL_OBJC(base);
-                                       sprintf(name, "Shape Keys");
+                                       strcpy(name, "Shape Keys");
                                }
                                        break;
                                        
@@ -643,7 +643,7 @@ void draw_channel_names(bAnimContext *ac, SpaceAction *saction, ARegion *ar)
                                                protect = ICON_LOCKED;
                                                
                                        sel = SEL_AGRP(agrp);
-                                       sprintf(name, agrp->name);
+                                       strcpy(name, agrp->name);
                                }
                                        break;
                                case ANIMTYPE_ACHAN: /* action channel */
@@ -676,7 +676,7 @@ void draw_channel_names(bAnimContext *ac, SpaceAction *saction, ARegion *ar)
                                        }
                                        
                                        sel = SEL_ACHAN(achan);
-                                       sprintf(name, achan->name);
+                                       strcpy(name, achan->name);
                                }
                                        break;
                                case ANIMTYPE_CONCHAN: /* constraint channel */
@@ -717,7 +717,7 @@ void draw_channel_names(bAnimContext *ac, SpaceAction *saction, ARegion *ar)
                                        }
                                        
                                        sel = SEL_CONCHAN(conchan);
-                                       sprintf(name, conchan->name);
+                                       strcpy(name, conchan->name);
                                }
                                        break;
                                case ANIMTYPE_ICU: /* ipo-curve channel */
@@ -751,9 +751,9 @@ void draw_channel_names(bAnimContext *ac, SpaceAction *saction, ARegion *ar)
                                        
                                        sel = SEL_ICU(icu);
                                        if (saction->pin)
-                                               sprintf(name, getname_ipocurve(icu, NULL)); // xxx func to eventually eliminate
+                                               strcpy(name, getname_ipocurve(icu, NULL)); // xxx func to eventually eliminate
                                        else
-                                               sprintf(name, getname_ipocurve(icu, ac->obact)); // xxx func to eventually eliminate
+                                               strcpy(name, getname_ipocurve(icu, ac->obact)); // xxx func to eventually eliminate
                                }
                                        break;
                                case ANIMTYPE_FILLIPO: /* ipo expand widget */
@@ -774,7 +774,7 @@ void draw_channel_names(bAnimContext *ac, SpaceAction *saction, ARegion *ar)
                                                expand = ICON_TRIA_RIGHT;
                                        
                                        sel = SEL_ACHAN(achan);
-                                       sprintf(name, "IPO Curves");
+                                       strcpy(name, "IPO Curves");
                                }
                                        break;
                                case ANIMTYPE_FILLCON: /* constraint expand widget */
@@ -795,7 +795,7 @@ void draw_channel_names(bAnimContext *ac, SpaceAction *saction, ARegion *ar)
                                                expand = ICON_TRIA_RIGHT;
                                                
                                        sel = SEL_ACHAN(achan);
-                                       sprintf(name, "Constraint");
+                                       strcpy(name, "Constraint");
                                }
                                        break;
                                
@@ -812,7 +812,7 @@ void draw_channel_names(bAnimContext *ac, SpaceAction *saction, ARegion *ar)
                                        if (kb->name[0] == '\0')
                                                sprintf(name, "Key %d", ale->index);
                                        else
-                                               sprintf(name, kb->name);
+                                               strcpy(name, kb->name);
                                }
                                        break;
                                
@@ -837,7 +837,7 @@ void draw_channel_names(bAnimContext *ac, SpaceAction *saction, ARegion *ar)
                                                {
                                                        /* this shouldn't cause any overflow... */
                                                        //sprintf(name, "3DView:%s", view3d_get_name(sa->spacedata.first)); // XXX missing func..
-                                                       sprintf(name, "3dView");
+                                                       strcpy(name, "3dView");
                                                        special= ICON_VIEW3D;
                                                }
                                                        break;
@@ -847,9 +847,9 @@ void draw_channel_names(bAnimContext *ac, SpaceAction *saction, ARegion *ar)
                                                        char treetype[12];
                                                        
                                                        if (snode->treetype == 1)
-                                                               sprintf(treetype, "Composite");
+                                                               strcpy(treetype, "Composite");
                                                        else
-                                                               sprintf(treetype, "Material");
+                                                               strcpy(treetype, "Material");
                                                        sprintf(name, "Nodes:%s", treetype);
                                                        
                                                        special= ICON_NODE;
@@ -880,7 +880,7 @@ void draw_channel_names(bAnimContext *ac, SpaceAction *saction, ARegion *ar)
                                                        if (sima->image)
                                                                sprintf(name, "Image:%s", sima->image->id.name+2);
                                                        else
-                                                               sprintf(name, "Image:<None>");
+                                                               strcpy(name, "Image:<None>");
                                                                
                                                        special= ICON_IMAGE_COL;
                                                }
index 3d45a42fc70630b0c088062d36edecc24eec2b2a..cdc8c88b4d647db55ffe3c2a380c13bd53d5d161 100644 (file)
@@ -103,9 +103,9 @@ extern void ui_draw_tria_icon(float x, float y, float aspect, char dir);
 // XXX butspace.h
 #define B_NODE_EXEC                    3610
 
+#if 0 // XXX
 static void snode_drawstring(void *curfont, SpaceNode *snode, char *str, int okwidth)
 {
-#if 0 // XXX
        char drawstr[NODE_MAXSTR];
        int width;
        
@@ -126,8 +126,8 @@ static void snode_drawstring(void *curfont, SpaceNode *snode, char *str, int okw
                if(len==0) return;
        }
        UI_DrawString(curfont, drawstr, 0);
-#endif
 }
+#endif
 
 static void node_scaling_widget(int color_id, float aspect, float xmin, float ymin, float xmax, float ymax)
 {
@@ -503,6 +503,7 @@ static void node_sync_cb(bContext *C, void *snode_v, void *node_v)
 
 /* **************  Socket callbacks *********** */
 
+#if 0
 static void socket_vector_menu_cb(bContext *C, void *node_v, void *ntree_v)
 {
        if(node_v && ntree_v) {
@@ -510,6 +511,7 @@ static void socket_vector_menu_cb(bContext *C, void *node_v, void *ntree_v)
                // addqueue(curarea->win, UI_BUT_EVENT, B_NODE_EXEC+((bNode *)node_v)->nr); XXX
        }
 }
+#endif
 
 /* NOTE: this is a block-menu, needs 0 events, otherwise the menu closes */
 static uiBlock *socket_vector_menu(bContext *C, uiMenuBlockHandle *handle, void *socket_v)
index cafe9acb96a6d784d2a7c944bb4ec135db9cb9c3..e3a0999ebf572a9e0b70bd7568165e8be45c6bcf 100644 (file)
@@ -2444,6 +2444,7 @@ void outliner_show_hierarchy(Scene *scene, SpaceOops *soops)
        BIF_undo_push("Outliner show hierarchy");
 }
 
+#if 0
 static void do_outliner_select(SpaceOops *soops, ListBase *lb, float y1, float y2, short *selecting)
 {
        TreeElement *te;
@@ -2468,6 +2469,7 @@ static void do_outliner_select(SpaceOops *soops, ListBase *lb, float y1, float y
                if((tselem->flag & TSE_CLOSED)==0) do_outliner_select(soops, &te->subtree, y1, y2, selecting);
        }
 }
+#endif
 
 /* its own redraw loop... urm */
 void outliner_select(ARegion *ar, SpaceOops *so)
index a1d6a9d13cb060c29d6d2db6c5aab39c656d7047..4e042d8ede5957e60a3866ef43c7d65537d51b56 100644 (file)
@@ -3710,25 +3710,25 @@ static void tekenhandlesN(Nurb *nu, short sel)
                                if( (bezt->f2 & SELECT)==sel) {
                                        fp= bezt->vec[0];
                                        
-                                       cpack(col[bezt->h1]);
+                                       cpack(col[(int)bezt->h1]);
                                        glVertex3fv(fp);
                                        glVertex3fv(fp+3); 
 
-                                       cpack(col[bezt->h2]);
+                                       cpack(col[(int)bezt->h2]);
                                        glVertex3fv(fp+3); 
                                        glVertex3fv(fp+6); 
                                }
                                else if( (bezt->f1 & SELECT)==sel) {
                                        fp= bezt->vec[0];
                                        
-                                       cpack(col[bezt->h1]);
+                                       cpack(col[(int)bezt->h1]);
                                        glVertex3fv(fp); 
                                        glVertex3fv(fp+3); 
                                }
                                else if( (bezt->f3 & SELECT)==sel) {
                                        fp= bezt->vec[1];
                                        
-                                       cpack(col[bezt->h2]);
+                                       cpack(col[(int)bezt->h2]);
                                        glVertex3fv(fp); 
                                        glVertex3fv(fp+3); 
                                }
index cb3ccf4b5df10dac1dc1f7d8658cc7a6b6b73280..e0b674678a6051754f3520f278addd48c2af9483 100644 (file)
@@ -42,6 +42,8 @@ struct EditFace;
 struct Nurb;
 struct BezTriple;
 struct BPoint;
+struct bContext;
+struct wmWindowManager;
 
 typedef struct ViewDepths {
        unsigned short w, h;
index 2d7d954b70daf6ce3f0dbc6c0e014f44276811fe..21a06fdd79479470aaebb5bd3e2f885a037f0793 100644 (file)
@@ -157,7 +157,7 @@ static void stats_background(RenderStats *rs)
                else 
                        spos+= sprintf(spos, "Sce: %s Ve:%d Fa:%d La:%d", G.scene->id.name+2, rs->totvert, rs->totface, rs->totlamp);
        }
-       printf(str); printf("\n");
+       printf("%s\n", str);
 }
 
 void RE_FreeRenderResult(RenderResult *res)
index ea7009658261d86e4651e0094d94edb2322ff935..7ea83f9fda4172692b5b3598189abc7178a8eea5 100644 (file)
@@ -332,7 +332,7 @@ void yafrayFileRender_t::displayImage()
                                char a = (byte_per_pix==4) ? fgetc(fp) : 255;
                                int bx = x-xs, by = y-ys;
                                if ((bx >= 0) && (bx < (int)re->rectx) && (by >= 0) && (by < re->recty)) {
-                                       float* bpt = (float*)rres.rectf + (bx + (((re->recty-1) - by)*re->rectx) << 2);
+                                       float* bpt = (float*)rres.rectf + ((bx + (((re->recty-1) - by)*re->rectx)) << 2);
                                        bpt[2] = (float)r * btf;
                                        bpt[1] = (float)g * btf;
                                        bpt[0] = (float)b * btf;
index db9fb7ccc720c5869b023c6e89de6cec4d3b44c3..39514ce259aa11176dd6b30c84652baa351066f4 100644 (file)
@@ -188,7 +188,7 @@ bool yafrayPluginRender_t::initExport()
                        }
                }
                yafray::yafrayConstructor *constructor;
-               constructor = (yafray::yafrayConstructor *)PIL_dynlib_find_symbol(handle, YAFRAY_SYMBOL);
+               constructor = (yafray::yafrayConstructor *)PIL_dynlib_find_symbol(handle, (char*)YAFRAY_SYMBOL);
                if (constructor==NULL)
                {
                        cerr << "Error loading yafray plugin: " << PIL_dynlib_get_error_as_string(handle) << endl;