diff options
author | Alan Hourihane <[email protected]> | 2004-12-02 13:29:40 +0000 |
---|---|---|
committer | Alan Hourihane <[email protected]> | 2004-12-02 13:29:40 +0000 |
commit | 22ae633d1ea636e0e07ba044a0f8fa2195c83bc6 (patch) | |
tree | 3b3bb53b6b73cffb24b6be0de28b4bd57d08c671 /src/mesa | |
parent | ba807fbe2914cf1135297428f7a3163707203073 (diff) |
Fix some warnings
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/common/xmlconfig.c | 6 | ||||
-rw-r--r-- | src/mesa/drivers/x11/glxapi.c | 3 | ||||
-rw-r--r-- | src/mesa/main/teximage.c | 2 | ||||
-rw-r--r-- | src/mesa/shader/program.c | 6 | ||||
-rw-r--r-- | src/mesa/swrast/s_alphabuf.c | 4 | ||||
-rw-r--r-- | src/mesa/swrast/s_linetemp.h | 2 | ||||
-rw-r--r-- | src/mesa/swrast/s_texture.c | 5 | ||||
-rw-r--r-- | src/mesa/tnl/t_vb_lighttmp.h | 8 |
8 files changed, 14 insertions, 22 deletions
diff --git a/src/mesa/drivers/dri/common/xmlconfig.c b/src/mesa/drivers/dri/common/xmlconfig.c index 8eb82a889a3..b635894fe53 100644 --- a/src/mesa/drivers/dri/common/xmlconfig.c +++ b/src/mesa/drivers/dri/common/xmlconfig.c @@ -49,6 +49,10 @@ #undef GET_PROGRAM_NAME #if (defined(__GNU_LIBRARY__) || defined(__GLIBC__)) && !defined(__UCLIBC__) +# if !defined(__GLIBC__) || (__GLIBC__ < 2) +/* These aren't declared in any libc5 header */ +extern char *program_invocation_name, *program_invocation_short_name; +# endif # define GET_PROGRAM_NAME() program_invocation_short_name #elif defined(__FreeBSD__) && (__FreeBSD__ >= 2) # include <osreldate.h> @@ -256,7 +260,7 @@ static GLfloat strToF (const XML_Char *string, const XML_Char **tail) { string = numStart; /* scale of the first digit */ - scale = sign * powf (10.0f, (GLfloat)(pointPos-1 + exponent)); + scale = sign * (GLfloat)pow (10.0, (GLdouble)(pointPos-1 + exponent)); /* second pass: parse digits */ do { diff --git a/src/mesa/drivers/x11/glxapi.c b/src/mesa/drivers/x11/glxapi.c index ae221d1f30c..d33358739c1 100644 --- a/src/mesa/drivers/x11/glxapi.c +++ b/src/mesa/drivers/x11/glxapi.c @@ -162,9 +162,12 @@ XVisualInfo PUBLIC * glXChooseVisual(Display *dpy, int screen, int *list) { struct _glxapi_table *t; +printf("1\n"); GET_DISPATCH(dpy, t); +printf("2\n"); if (!t) return NULL; +printf("3\n"); return (t->ChooseVisual)(dpy, screen, list); } diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index f35b236508c..4dff27567e0 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -886,11 +886,9 @@ _mesa_max_texture_levels(GLcontext *ctx, GLenum target) case GL_TEXTURE_CUBE_MAP_ARB: case GL_PROXY_TEXTURE_CUBE_MAP_ARB: return ctx->Const.MaxCubeTextureLevels; - break; case GL_TEXTURE_RECTANGLE_NV: case GL_PROXY_TEXTURE_RECTANGLE_NV: return 1; - break; default: return 0; /* bad target */ } diff --git a/src/mesa/shader/program.c b/src/mesa/shader/program.c index 88085f811ae..c2f4b146b6c 100644 --- a/src/mesa/shader/program.c +++ b/src/mesa/shader/program.c @@ -541,8 +541,7 @@ _mesa_fetch_state(GLcontext *ctx, const enum state_index state[], _mesa_problem(ctx, "Invalid material state in fetch_state"); return; } - }; - return; + } case STATE_LIGHT: { /* state[1] is the light number */ @@ -590,7 +589,6 @@ _mesa_fetch_state(GLcontext *ctx, const enum state_index state[], return; } } - return; case STATE_LIGHTMODEL_AMBIENT: COPY_4V(value, ctx->Light.Model.Ambient); return; @@ -650,7 +648,6 @@ _mesa_fetch_state(GLcontext *ctx, const enum state_index state[], return; } } - return; case STATE_TEXGEN: { /* state[1] is the texture unit */ @@ -686,7 +683,6 @@ _mesa_fetch_state(GLcontext *ctx, const enum state_index state[], return; } } - return; case STATE_TEXENV_COLOR: { /* state[1] is the texture unit */ diff --git a/src/mesa/swrast/s_alphabuf.c b/src/mesa/swrast/s_alphabuf.c index 736ff2d7394..5d8107c2d6b 100644 --- a/src/mesa/swrast/s_alphabuf.c +++ b/src/mesa/swrast/s_alphabuf.c @@ -178,16 +178,12 @@ GLchan *get_alpha_buffer( GLcontext *ctx ) switch (swrast->CurrentBufferBit) { case DD_FRONT_LEFT_BIT: return ctx->DrawBuffer->FrontLeftAlpha; - break; case DD_BACK_LEFT_BIT: return ctx->DrawBuffer->BackLeftAlpha; - break; case DD_FRONT_RIGHT_BIT: return ctx->DrawBuffer->FrontRightAlpha; - break; case DD_BACK_RIGHT_BIT: return ctx->DrawBuffer->BackRightAlpha; - break; default: _mesa_problem(ctx, "Bad CurrentBuffer in get_alpha_buffer()"); return (GLchan *) ctx->DrawBuffer->FrontLeftAlpha; diff --git a/src/mesa/swrast/s_linetemp.h b/src/mesa/swrast/s_linetemp.h index 77c985455dc..5d9591d83ff 100644 --- a/src/mesa/swrast/s_linetemp.h +++ b/src/mesa/swrast/s_linetemp.h @@ -425,6 +425,8 @@ NAME( GLcontext *ctx, const SWvertex *vert0, const SWvertex *vert1 ) RENDER_SPAN( span ); #endif + (void)span; + } diff --git a/src/mesa/swrast/s_texture.c b/src/mesa/swrast/s_texture.c index 4cb84d12f5b..213971667ad 100644 --- a/src/mesa/swrast/s_texture.c +++ b/src/mesa/swrast/s_texture.c @@ -2727,7 +2727,6 @@ _swrast_choose_texture_sample_func( GLcontext *ctx, ASSERT(t->MinFilter == GL_NEAREST); return &sample_nearest_1d; } - break; case GL_TEXTURE_2D: if (format == GL_DEPTH_COMPONENT) { return &sample_depth_texture; @@ -2759,7 +2758,6 @@ _swrast_choose_texture_sample_func( GLcontext *ctx, return &sample_nearest_2d; } } - break; case GL_TEXTURE_3D: if (needLambda) { return &sample_lambda_3d; @@ -2771,7 +2769,6 @@ _swrast_choose_texture_sample_func( GLcontext *ctx, ASSERT(t->MinFilter == GL_NEAREST); return &sample_nearest_3d; } - break; case GL_TEXTURE_CUBE_MAP: if (needLambda) { return &sample_lambda_cube; @@ -2783,7 +2780,6 @@ _swrast_choose_texture_sample_func( GLcontext *ctx, ASSERT(t->MinFilter == GL_NEAREST); return &sample_nearest_cube; } - break; case GL_TEXTURE_RECTANGLE_NV: if (needLambda) { return &sample_lambda_rect; @@ -2795,7 +2791,6 @@ _swrast_choose_texture_sample_func( GLcontext *ctx, ASSERT(t->MinFilter == GL_NEAREST); return &sample_nearest_rect; } - break; default: _mesa_problem(ctx, "invalid target in _swrast_choose_texture_sample_func"); diff --git a/src/mesa/tnl/t_vb_lighttmp.h b/src/mesa/tnl/t_vb_lighttmp.h index 2eaf61ff4d0..32265851cd2 100644 --- a/src/mesa/tnl/t_vb_lighttmp.h +++ b/src/mesa/tnl/t_vb_lighttmp.h @@ -36,7 +36,7 @@ /* define TRACE to trace lighting code */ -/* #define TRACE 1 */ +#define TRACE 1 /* * ctx is the current context @@ -253,8 +253,9 @@ static void TAG(light_rgba)( GLcontext *ctx, const GLfloat *normal = (GLfloat *)VB->NormalPtr->data; GLfloat (*Fcolor)[4] = (GLfloat (*)[4]) store->LitColor[0].data; +#if IDX & LIGHT_TWOSIDE GLfloat (*Bcolor)[4] = (GLfloat (*)[4]) store->LitColor[1].data; - GLfloat (*color[2])[4]; +#endif const GLuint nr = VB->Count; @@ -265,9 +266,6 @@ static void TAG(light_rgba)( GLcontext *ctx, (void) nstride; (void) vstride; - color[0] = Fcolor; - color[1] = Bcolor; - VB->ColorPtr[0] = &store->LitColor[0]; sumA[0] = ctx->Light.Material.Attrib[MAT_ATTRIB_FRONT_DIFFUSE][3]; |