Fix various gcc warning related to signed/unsigned parameters passed to
authorKen Hughes <khughes@pacific.edu>
Sat, 17 Mar 2007 14:15:02 +0000 (14:15 +0000)
committerKen Hughes <khughes@pacific.edu>
Sat, 17 Mar 2007 14:15:02 +0000 (14:15 +0000)
OpenGL functions.

source/blender/src/drawarmature.c
source/blender/src/drawimage.c
source/blender/src/drawobject.c
source/blender/src/drawseq.c
source/blender/src/drawview.c
source/blender/src/glutil.c
source/blender/src/interface_draw.c
source/blender/src/outliner.c
source/blender/src/transform_constraints.c
source/blender/src/transform_generics.c

index 864e0dd397e570c2d0b92b53bb26ef558c0e9f67..6d3a63609898a355d2ab59ba0059086aca1c7fb9 100644 (file)
@@ -759,11 +759,11 @@ static void draw_sphere_bone(int dt, int armflag, int boneflag, int constflag, u
        gluDeleteQuadric(qobj);  
 }
 
-static char bm_dot6[]= {0x0, 0x18, 0x3C, 0x7E, 0x7E, 0x3C, 0x18, 0x0}; 
-static char bm_dot8[]= {0x3C, 0x7E, 0xFF, 0xFF, 0xFF, 0xFF, 0x7E, 0x3C}; 
+static GLubyte bm_dot6[]= {0x0, 0x18, 0x3C, 0x7E, 0x7E, 0x3C, 0x18, 0x0}; 
+static GLubyte bm_dot8[]= {0x3C, 0x7E, 0xFF, 0xFF, 0xFF, 0xFF, 0x7E, 0x3C}; 
 
-static char bm_dot5[]= {0x0, 0x0, 0x10, 0x38, 0x7c, 0x38, 0x10, 0x0}; 
-static char bm_dot7[]= {0x0, 0x38, 0x7C, 0xFE, 0xFE, 0xFE, 0x7C, 0x38}; 
+static GLubyte bm_dot5[]= {0x0, 0x0, 0x10, 0x38, 0x7c, 0x38, 0x10, 0x0}; 
+static GLubyte bm_dot7[]= {0x0, 0x38, 0x7C, 0xFE, 0xFE, 0xFE, 0x7C, 0x38}; 
 
 
 static void draw_line_bone(int armflag, int boneflag, int constflag, unsigned int id, bPoseChannel *pchan, EditBone *ebone)
index 63e5031070bb9d419e1cec93f7a2c5df56a6aef1..fc4d528e45e798bf0c76e2264fa7813dca143d1b 100644 (file)
@@ -456,9 +456,9 @@ void draw_tfaces(void)
                                        if(tface->flag & TF_SELECT) {
                                                if(!(~tface->flag & (TF_SEL1|TF_SEL2|TF_SEL3)) &&
                                                   (!mface->v4 || tface->flag & TF_SEL4))
-                                                       glColor4ubv(col2);
+                                                       glColor4ubv((GLubyte *)col2);
                                                else
-                                                       glColor4ubv(col1);
+                                                       glColor4ubv((GLubyte *)col1);
                                                        
                                                glBegin(mface->v4?GL_QUADS:GL_TRIANGLES);
                                                        glVertex2fv(tface->uv[0]);
@@ -2037,7 +2037,7 @@ static void imagewindow_progress(ScrArea *sa, RenderResult *rr, volatile rcti *r
                rectf= rr->rectf;
        else {
                if(rr->rect32)
-                       rect32= rr->rect32;
+                       rect32= (unsigned int *)rr->rect32;
                else {
                        if(rr->renlay==NULL || rr->renlay->rectf==NULL) return;
                        rectf= rr->renlay->rectf;
index 5bad88051e66ea89182b91e90829f1690ea9f78e..30786f8b2f5bb9b31d051f7ff58bad6414ecf6dd 100644 (file)
@@ -1519,13 +1519,13 @@ static void draw_em_fancy_verts(EditMesh *em, DerivedMesh *cageDM)
                                
                        if(G.scene->selectmode & SCE_SELECT_VERTEX) {
                                glPointSize(size);
-                               glColor4ubv(col);
+                               glColor4ubv((GLubyte *)col);
                                draw_dm_verts(cageDM, sel);
                        }
                        
                        if(G.scene->selectmode & SCE_SELECT_FACE) {
                                glPointSize(fsize);
-                               glColor4ubv(fcol);
+                               glColor4ubv((GLubyte *)fcol);
                                draw_dm_face_centers(cageDM, sel);
                        }
                        
@@ -1543,11 +1543,11 @@ static void draw_em_fancy_verts(EditMesh *em, DerivedMesh *cageDM)
 static void draw_em_fancy_edges(DerivedMesh *cageDM)
 {
        int pass;
-       char wire[4], sel[4];
+       unsigned char wire[4], sel[4];
 
        /* since this function does transparant... */
-       BIF_GetThemeColor3ubv(TH_EDGE_SELECT, sel);
-       BIF_GetThemeColor3ubv(TH_WIRE, wire);
+       BIF_GetThemeColor3ubv(TH_EDGE_SELECT, (char *)sel);
+       BIF_GetThemeColor3ubv(TH_WIRE, (char *)wire);
 
        for (pass=0; pass<2; pass++) {
                        /* show wires in transparant when no zbuf clipping for select */
@@ -1861,10 +1861,10 @@ static void draw_em_fancy(Object *ob, EditMesh *em, DerivedMesh *cageDM, Derived
        }
        
        if((G.f & (G_FACESELECT+G_DRAWFACES))) {        /* transp faces */
-               char col1[4], col2[4];
+               unsigned char col1[4], col2[4];
                        
-               BIF_GetThemeColor4ubv(TH_FACE, col1);
-               BIF_GetThemeColor4ubv(TH_FACE_SELECT, col2);
+               BIF_GetThemeColor4ubv(TH_FACE, (char *)col1);
+               BIF_GetThemeColor4ubv(TH_FACE_SELECT, (char *)col2);
                
                glEnable(GL_BLEND);
                glDepthMask(0);         // disable write in zbuffer, needed for nice transp
@@ -4187,7 +4187,7 @@ void draw_object(Base *base, int flag)
 
                        BIF_GetThemeColor3ubv(TH_GRID, col);
                        make_axis_color(col, col2, 'z');
-                       glColor3ubv(col2);
+                       glColor3ubv((GLubyte *)col2);
 
                        for (curcon = list->first; curcon; curcon=curcon->next){
                                if ((curcon->flag & CONSTRAINT_EXPAND)&&(curcon->type!=CONSTRAINT_TYPE_NULL)&&(constraint_has_target(curcon))){
index 821cbbc4d45a3b812aded3e7649c5740d11cbef7..74b51655271476a37942c9c5e78e576e27dc9cb1 100644 (file)
@@ -251,12 +251,12 @@ static void drawmeta_contents(Sequence *seqm, float x1, float y1, float x2, floa
        WHILE_SEQ(&seqm->seqbase) {
                get_seq_color3ubv(seq, col);
                
-               glColor3ubv(col);
+               glColor3ubv((GLubyte *)col);
 
                glRectf(x1,  y1,  x1+0.9*dx,  y2);
                
                BIF_GetColorPtrBlendShade3ubv(col, col, col, 0.0, -30);
-               glColor3ubv(col);
+               glColor3ubv((GLubyte *)col);
 
                fdrawbox(x1,  y1,  x1+0.9*dx,  y2);
                
@@ -521,7 +521,7 @@ static void draw_seq_extensions(Sequence *seq, SpaceSeq *sseq)
        if(seq->startstill) {
                get_seq_color3ubv(seq, col);
                BIF_GetColorPtrBlendShade3ubv(col, blendcol, col, 0.75, 40);
-               glColor3ubv(col);
+               glColor3ubv((GLubyte *)col);
                
                draw_shadedstrip(seq, col, x1, y1, (float)(seq->start), y2);
                
@@ -530,7 +530,7 @@ static void draw_seq_extensions(Sequence *seq, SpaceSeq *sseq)
                if (seq->flag & SELECT) BIF_GetColorPtrBlendShade3ubv(col, col, col, 0.0, 24);
                else BIF_GetColorPtrBlendShade3ubv(col, col, col, 0.0, -16);
                
-               glColor3ubv(col);
+               glColor3ubv((GLubyte *)col);
                
                for(a=y1; a< y2; a+= pixely*2.0 ) {
                        fdrawline(x1,  a,  (float)(seq->start),  a);
@@ -539,7 +539,7 @@ static void draw_seq_extensions(Sequence *seq, SpaceSeq *sseq)
        if(seq->endstill) {
                get_seq_color3ubv(seq, col);
                BIF_GetColorPtrBlendShade3ubv(col, blendcol, col, 0.75, 40);
-               glColor3ubv(col);
+               glColor3ubv((GLubyte *)col);
                
                draw_shadedstrip(seq, col, (float)(seq->start+seq->len), y1, x2, y2);
                
@@ -548,7 +548,7 @@ static void draw_seq_extensions(Sequence *seq, SpaceSeq *sseq)
                if (seq->flag & SELECT) BIF_GetColorPtrBlendShade3ubv(col, col, col, 0.0, 24);
                else BIF_GetColorPtrBlendShade3ubv(col, col, col, 0.0, -16);
                
-               glColor3ubv(col);
+               glColor3ubv((GLubyte *)col);
                
                for(a=y1; a< y2; a+= pixely*2.0 ) {
                        fdrawline((float)(seq->start+seq->len),  a,  x2,  a);
@@ -643,7 +643,7 @@ static void draw_shadedstrip(Sequence *seq, char *col, float x1, float y1, float
        if(seq->flag & SELECT) BIF_GetColorPtrBlendShade3ubv(col, col, col, 0.0, -50);
        else BIF_GetColorPtrBlendShade3ubv(col, col, col, 0.0, 0);
        
-       glColor3ubv(col);
+       glColor3ubv((GLubyte *)col);
        
        glVertex2f(x1,y1);
        glVertex2f(x2,y1);
@@ -651,7 +651,7 @@ static void draw_shadedstrip(Sequence *seq, char *col, float x1, float y1, float
        if(seq->flag & SELECT) BIF_GetColorPtrBlendShade3ubv(col, col, col, 0.0, 5);
        else BIF_GetColorPtrBlendShade3ubv(col, col, col, 0.0, -5);
 
-       glColor3ubv(col);
+       glColor3ubv((GLubyte *)col);
        
        glVertex2f(x2,ymid1);
        glVertex2f(x1,ymid1);
@@ -668,7 +668,7 @@ static void draw_shadedstrip(Sequence *seq, char *col, float x1, float y1, float
        if(seq->flag & SELECT) BIF_GetColorPtrBlendShade3ubv(col, col, col, 0.0, -15);
        else BIF_GetColorPtrBlendShade3ubv(col, col, col, 0.0, 25);
        
-       glColor3ubv(col);
+       glColor3ubv((GLubyte *)col);
        
        glVertex2f(x2,y2);
        glVertex2f(x1,y2);
@@ -723,7 +723,7 @@ static void draw_seq_strip(Sequence *seq, ScrArea *sa, SpaceSeq *sseq)
        else if (seq->flag & SELECT) BIF_GetColorPtrBlendShade3ubv(col, col, col, 0.0, -150);
        else BIF_GetColorPtrBlendShade3ubv(col, col, col, 0.0, -60);
 
-       glColor3ubv(col);
+       glColor3ubv((GLubyte *)col);
        gl_round_box_shade(GL_LINE_LOOP, x1, y1, x2, y2, 0.0, 0.1, 0.0);
 
        
index 0a20a75ce88ecdc1bd0b46495b715833ff8431c9..ab317ce48263d423e6cadf5b5b27659d8382f3d1 100644 (file)
@@ -612,13 +612,13 @@ static void drawgrid(void)
        /* center cross */
        if(G.vd->view==3) make_axis_color(col, col2, 'y');
        else make_axis_color(col, col2, 'x');
-       glColor3ubv(col2);
+       glColor3ubv((GLubyte *)col2);
        
        fdrawline(0.0,  y,  (float)curarea->winx,  y); 
        
        if(G.vd->view==7) make_axis_color(col, col2, 'y');
        else make_axis_color(col, col2, 'z');
-       glColor3ubv(col2);
+       glColor3ubv((GLubyte *)col2);
 
        fdrawline(x, 0.0, x, (float)curarea->winy); 
 
@@ -662,7 +662,7 @@ static void drawfloor(void)
                        /* check for the 'show Y axis' preference */
                        if (vd->gridflag & V3D_SHOW_Y) { 
                                make_axis_color(col, col2, 'y');
-                               glColor3ubv(col2);
+                               glColor3ubv((GLubyte *)col2);
                                
                                draw_line = 1;
                        } else if (vd->gridflag & V3D_SHOW_FLOOR) {
@@ -701,7 +701,7 @@ static void drawfloor(void)
                        /* check for the 'show X axis' preference */
                        if (vd->gridflag & V3D_SHOW_X) { 
                                make_axis_color(col, col2, 'x');
-                               glColor3ubv(col2);
+                               glColor3ubv((GLubyte *)col2);
                                
                                draw_line = 1;
                        } else if (vd->gridflag & V3D_SHOW_FLOOR) {
@@ -738,7 +738,7 @@ static void drawfloor(void)
        /* check for the 'show Z axis' preference */
        if (vd->gridflag & V3D_SHOW_Z) {
                make_axis_color(col, col2, 'z');
-               glColor3ubv(col2);
+               glColor3ubv((GLubyte *)col2);
                
                glBegin(GL_LINE_STRIP);
                vert[0]= 0;
@@ -1372,14 +1372,14 @@ static void draw_view_axis(void)
        float dx, dy;
        float h, s, v;
        
-       BIF_GetThemeColor3ubv(TH_GRID, gridcol);
+       BIF_GetThemeColor3ubv(TH_GRID, (char *)gridcol);
        
        /* X */
        vec[0] = vec[3] = 1;
        vec[1] = vec[2] = 0;
        QuatMulVecf(G.vd->viewquat, vec);
        
-       make_axis_color(gridcol, col, 'x');
+       make_axis_color((char *)gridcol, (char *)col, 'x');
        rgb_to_hsv(col[0]/255.0f, col[1]/255.0f, col[2]/255.0f, &h, &s, &v);
        s = s<0.5 ? s+0.5 : 1.0;
        v = 0.3;
@@ -1400,7 +1400,7 @@ static void draw_view_axis(void)
        vec[0] = vec[2] = 0;
        QuatMulVecf(G.vd->viewquat, vec);
        
-       make_axis_color(gridcol, col, 'y');
+       make_axis_color((char *)gridcol, (char *)col, 'y');
        rgb_to_hsv(col[0]/255.0f, col[1]/255.0f, col[2]/255.0f, &h, &s, &v);
        s = s<0.5 ? s+0.5 : 1.0;
        v = 0.3;
@@ -1421,7 +1421,7 @@ static void draw_view_axis(void)
        vec[1] = vec[0] = 0;
        QuatMulVecf(G.vd->viewquat, vec);
        
-       make_axis_color(gridcol, col, 'z');
+       make_axis_color((char *)gridcol, (char *)col, 'z');
        rgb_to_hsv(col[0]/255.0f, col[1]/255.0f, col[2]/255.0f, &h, &s, &v);
        s = s<0.5 ? s+0.5 : 1.0;
        v = 0.5;
index eddfa32739ffb7e6bde4cbb2a6c05b4e5f9219a5..248d36dcb1e67b20aafcd2689f2dc62d9a13a3f6 100644 (file)
@@ -232,7 +232,7 @@ static int get_cached_work_texture(int *w_r, int *h_r)
                GLint ltexid= glaGetOneInteger(GL_TEXTURE_2D);
                unsigned char *tbuf;
 
-               glGenTextures(1, &texid);
+               glGenTextures(1, (GLuint *)&texid);
 
                glBindTexture(GL_TEXTURE_2D, texid);
 
index e979d4453cbd2b4a06be926db9528c5cba0a3158..3c67975e96fcfd5eb8abc50ac16627252eb4d278 100644 (file)
@@ -1086,11 +1086,11 @@ static void round_button(float x1, float y1, float x2, float y2, float asp,
        if(col[1]<100) col[1]= 0; else col[1]-= 100;
        if(col[2]<100) col[2]= 0; else col[2]-= 100;
        col[3]= 80;
-       glColor4ubv(col);
+       glColor4ubv((GLubyte *)col);
        gl_round_box(GL_LINE_LOOP, x1, y1, x2, y2, rad - asp);
        gl_round_box(GL_LINE_LOOP, x1, y1, x2, y2, rad + asp);
        col[3]= 180;
-       glColor4ubv(col);
+       glColor4ubv((GLubyte *)col);
        gl_round_box(GL_LINE_LOOP, x1, y1, x2, y2, rad);
 
        glDisable( GL_BLEND );
@@ -1384,11 +1384,11 @@ void uiDrawMenuBox(float minx, float miny, float maxx, float maxy, short flag)
                ui_shadowbox(minx, miny, maxx, maxy, 2.0, (100*col[3])>>8);
                
                glEnable(GL_BLEND);
-               glColor4ubv(col);
+               glColor4ubv((GLubyte *)col);
                glRectf(minx-1, miny, minx, maxy);      // 1 pixel on left, to distinguish sublevel menus
        }
        glEnable(GL_BLEND);
-       glColor4ubv(col);
+       glColor4ubv((GLubyte *)col);
        glRectf(minx, miny, maxx, maxy);
        glDisable(GL_BLEND);
 }
index 6b777377a0f2eeb5364f2038c340aa14fc842a1d..d2cd8eb002c54ad298f6ba9a2e0bfd47498645c6 100644 (file)
@@ -1,5 +1,5 @@
 /**
- * $Id:
+ * $Id$
  *
  * ***** BEGIN GPL LICENSE BLOCK *****
  *
@@ -2949,7 +2949,7 @@ static void outliner_draw_tree_element(SpaceOops *soops, TreeElement *te, int st
                                        }
                                        else BIF_GetThemeColorType4ubv(TH_SELECT, SPACE_VIEW3D, col);
                                        col[3]= 100;
-                                       glColor4ubv(col);
+                                       glColor4ubv((GLubyte *)col);
                                }
 
 #ifdef WITH_VERSE
index f67b3acff3a5a09c168ebf7b1159dceb58823680..dbf539a1740973777085b8f61d324bfe7c7e711b 100755 (executable)
@@ -663,7 +663,7 @@ void BIF_drawConstraint(void)
                        drawLine(tc->center, tc->mtx[1], 'y', 0);
                        drawLine(tc->center, tc->mtx[2], 'z', 0);
 
-                       glColor3ubv(col2);
+                       glColor3ubv((GLubyte *)col2);
                        
                        glDisable(GL_DEPTH_TEST);
                        setlinestyle(1);
index 1574a498cf9fdf8e2e6d1c24a1a3eb075984071e..10e1e8a704c89520f6a03aacadeb095f6c28643b 100755 (executable)
@@ -430,7 +430,7 @@ void drawLine(float *center, float *dir, char axis, short options)
                BIF_GetThemeColor3ubv(TH_GRID, col);
        }
        make_axis_color(col, col2, axis);
-       glColor3ubv(col2);
+       glColor3ubv((GLubyte *)col2);
 
        setlinestyle(0);
        glBegin(GL_LINE_STRIP);