The occosional warning cleanup;
authorTon Roosendaal <ton@blender.org>
Tue, 7 Nov 2006 16:43:44 +0000 (16:43 +0000)
committerTon Roosendaal <ton@blender.org>
Tue, 7 Nov 2006 16:43:44 +0000 (16:43 +0000)
- unused varialbles
- unused functions
- wrong casted callback for SDL
- gcc3 related; (GLint *) for opengl calls.

source/blender/src/editobject.c
source/blender/src/fluidsim.c
source/blender/src/glutil.c
source/blender/src/headerbuttons.c
source/blender/src/retopo.c
source/blender/src/sculptmode.c

index 36575a6c5c6267e140ba3a26347dd72fc98546d2..d81ab555e49f4372566c26a189864a6b1107bf41 100644 (file)
@@ -1583,7 +1583,7 @@ void enter_editmode(int wc)
 void exit_editmode(int flag)   /* freedata==0 at render, 1= freedata, 2= do undo buffer too */
 {
        Object *ob;
-       int freedata = flag & EM_FREEDATA, freeundo = flag & EM_FREEUNDO;
+       int freedata = flag & EM_FREEDATA;
        
        if(G.obedit==NULL) return;
 
@@ -1663,7 +1663,7 @@ void exit_editmode(int flag)      /* freedata==0 at render, 1= freedata, 2= do undo b
 
        scrarea_queue_headredraw(curarea);
        
-       if(G.obedit==NULL && flag & EM_FREEUNDO
+       if(G.obedit==NULL && (flag & EM_FREEUNDO)
                BIF_undo_push("Editmode");
        
        if(flag & EM_WAITCURSOR) waitcursor(0);
index 276650a9546e690ea61b2a3017f3b02c74c788b5..712548387b32a701e8d8224b13323380319a29ed 100644 (file)
@@ -313,6 +313,7 @@ void fluidsimGetGeometryObjFilename(struct Object *ob, char *dst) { //, char *sr
 
 // simplify channels before printing
 // for API this is done anyway upon init
+#if 0
 static void fluidsimPrintChannel(FILE *file, float *channel, int paramsize, char *str, int entries) 
 { 
        int i,j; 
@@ -338,7 +339,7 @@ static void fluidsimPrintChannel(FILE *file, float *channel, int paramsize, char
 
        fprintf(file,  "      ; \n" ); 
 }
-
+#endif
 
 static void fluidsimInitChannel(float **setchannel, int size, float *time, 
                int *icuIds, float *defaults, Ipo* ipo, int entries) {
@@ -422,7 +423,7 @@ int                 globalBakeState = 0; // 0 everything ok, -1 abort simulation, -2 sim error
 int                    globalBakeFrame = 0;
 
 // run simulation in seperate thread
-int fluidsimSimulateThread(void) { // *ptr) {
+static int fluidsimSimulateThread(void *unused) { // *ptr) {
        //char* fnameCfgPath = (char*)(ptr);
        int ret=0;
        
index 711c809ce40bf0e9d2dda856428b4e9aea46c17a..fde0601e3ee7a13bee52e94e4b80460f0493fa3b 100644 (file)
@@ -34,6 +34,7 @@
 
 #include <stdio.h>
 #include <math.h>
+#include <string.h>
 
 #include "MEM_guardedalloc.h"
 
index 57d52edc1093cbf47a2a5493f7e22d6327a6b2d0..6d9e216c47af887311c814d4e2446850b71654ca 100644 (file)
@@ -1294,7 +1294,7 @@ void do_global_buttons(unsigned short event)
                else if(G.buts->mainb==CONTEXT_EDITING) {
                        SculptData *sd= &G.scene->sculptdata;
                        if(sd && sd->texact != -1) {
-                               if(sd->mtex[sd->texact]) autotexname(sd->mtex[sd->texact]);
+                               if(sd->mtex[sd->texact]) autotexname(sd->mtex[sd->texact]->tex);
 
                                BIF_undo_push("Auto name");
                                allqueue(REDRAWBUTSEDIT, 0);
index 3d08f0a4e73029b0e7f8c7b0b9c05fa59ebab4c1..164823693a0594730802b9946315445bee30bd49 100644 (file)
@@ -421,7 +421,7 @@ void retopo_paint_view_update(struct View3D *v3d)
                        for(p= l->points.first; p; p= p->next) {
                                gluProject(p->co[0],p->co[1],p->co[2], v3d->retopo_view_data->modelviewmat,
                                           v3d->retopo_view_data->projectionmat,
-                                          v3d->retopo_view_data->viewport, &ux, &uy, &uz);
+                                          (GLint *)v3d->retopo_view_data->viewport, &ux, &uy, &uz);
                                p->loc.x= ux;
                                p->loc.y= uy;
                        }
@@ -701,7 +701,7 @@ void retopo_do_2d(View3D *v3d, short proj[2], float *v, char adj)
                                /* Find the depth of (0,0,0); */
                                gluProject(0,0,0,v3d->retopo_view_data->modelviewmat,
                                           v3d->retopo_view_data->projectionmat,
-                                          v3d->retopo_view_data->viewport,&px,&py,&pz);
+                                          (GLint *)v3d->retopo_view_data->viewport,&px,&py,&pz);
                                depth= pz;
                        }
                        else return;
@@ -710,7 +710,7 @@ void retopo_do_2d(View3D *v3d, short proj[2], float *v, char adj)
                /* Find 3D location with new depth (unproject) */
                gluUnProject(proj[0],proj[1],depth,v3d->retopo_view_data->modelviewmat,
                             v3d->retopo_view_data->projectionmat,
-                            v3d->retopo_view_data->viewport,&px,&py,&pz);
+                            (GLint *)v3d->retopo_view_data->viewport,&px,&py,&pz);
                
                v[0]= px;
                v[1]= py;
@@ -725,7 +725,7 @@ void retopo_do_vert(View3D *v3d, float *v)
 
        /* Find 2D location (project) */
        gluProject(v[0],v[1],v[2],v3d->retopo_view_data->modelviewmat,v3d->retopo_view_data->projectionmat,
-                  v3d->retopo_view_data->viewport,&px,&py,&pz);
+                  (GLint *)v3d->retopo_view_data->viewport,&px,&py,&pz);
        proj[0]= px;
        proj[1]= py;
        
@@ -799,7 +799,7 @@ void retopo_matrix_update(View3D *v3d)
                if(rvd && rvd->queue_matrix_update) {
                        glGetDoublev(GL_MODELVIEW_MATRIX, rvd->modelviewmat);
                        glGetDoublev(GL_PROJECTION_MATRIX, rvd->projectionmat);
-                       glGetIntegerv(GL_VIEWPORT, rvd->viewport);
+                       glGetIntegerv(GL_VIEWPORT, (GLint *)rvd->viewport);
                        rvd->viewport[0]= rvd->viewport[1]= 0;
 
                        rvd->queue_matrix_update= 0;
index 6b908c1d5939375ca1e7f6dcb912b3c5130c0e06..6df70b2cb6c7a526c606486606993fcf22b3efd8 100644 (file)
@@ -400,7 +400,7 @@ void init_sculptmatrices()
 
        glGetDoublev(GL_MODELVIEW_MATRIX, G.scene->sculptdata.modelviewmat);
        glGetDoublev(GL_PROJECTION_MATRIX, G.scene->sculptdata.projectionmat);
-       glGetIntegerv(GL_VIEWPORT, G.scene->sculptdata.viewport);
+       glGetIntegerv(GL_VIEWPORT, (GLint *)G.scene->sculptdata.viewport);
        /* Set up viewport so that gluUnProject will give correct values */
        G.scene->sculptdata.viewport[0] = 0;
        G.scene->sculptdata.viewport[1] = 0;
@@ -439,7 +439,7 @@ vec3f unproject(const short x, const short y, const float z)
 
         gluUnProject(x,y,z, G.scene->sculptdata.modelviewmat,
                     G.scene->sculptdata.projectionmat,
-                    G.scene->sculptdata.viewport, &ux, &uy, &uz );
+                    (GLint *)G.scene->sculptdata.viewport, &ux, &uy, &uz );
        p.x= ux;
        p.y= uy;
        p.z= uz;
@@ -452,7 +452,7 @@ void project(const float v[3], short p[2])
 
        gluProject(v[0],v[1],v[2], G.scene->sculptdata.modelviewmat,
                   G.scene->sculptdata.projectionmat,
-                  G.scene->sculptdata.viewport, &ux, &uy, &uz);
+                  (GLint *)G.scene->sculptdata.viewport, &ux, &uy, &uz);
        p[0]= ux;
        p[1]= uy;
 }
@@ -1087,7 +1087,7 @@ void sculptmode_propset(unsigned short event)
                        pd->origstrength= sculptmode_brush()->strength;
 
                        /* Prepare texture */
-                       glGenTextures(1, &pd->tex);
+                       glGenTextures(1, (GLint *)&pd->tex);
                        glBindTexture(GL_TEXTURE_2D, pd->tex);
 
                        if(G.scene->sculptdata.texrept!=SCULPTREPT_3D)