diff options
author | Karl Schultz <[email protected]> | 2003-09-18 15:14:10 +0000 |
---|---|---|
committer | Karl Schultz <[email protected]> | 2003-09-18 15:14:10 +0000 |
commit | df8d337eec9b9f6f1d6ed0b4a7044b4f4420c52b (patch) | |
tree | b9a0b26cc589758e68ddb0801d6b9ca1e7dd1b47 /src/mesa/main | |
parent | 65f605849af1a14eaa79dab6c9d80575d5c85db0 (diff) |
Add casts to prevent signed/unsigned compare compiler warnings.
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/bufferobj.c | 8 | ||||
-rw-r--r-- | src/mesa/main/program.c | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c index 57e6b8df23c..3ae35d5b4d5 100644 --- a/src/mesa/main/bufferobj.c +++ b/src/mesa/main/bufferobj.c @@ -110,7 +110,7 @@ buffer_object_subdata_range_good( GLcontext * ctx, GLenum target, return NULL; } - if ( (offset + size) > bufObj->Size ) { + if ( (GLuint)(offset + size) > bufObj->Size ) { _mesa_error(ctx, GL_INVALID_VALUE, "%s(size + offset > buffer size)", str); return NULL; @@ -261,7 +261,7 @@ _mesa_buffer_subdata( GLcontext *ctx, GLenum target, GLintptrARB offset, struct gl_buffer_object * bufObj ) { if ( (bufObj->Data != NULL) - && ((size + offset) <= bufObj->Size) ) { + && ((GLuint)(size + offset) <= bufObj->Size) ) { _mesa_memcpy( (GLubyte *) bufObj->Data + offset, data, size ); } } @@ -291,7 +291,7 @@ _mesa_buffer_get_subdata( GLcontext *ctx, GLenum target, GLintptrARB offset, struct gl_buffer_object * bufObj ) { if ( (bufObj->Data != NULL) - && ((size + offset) <= bufObj->Size) ) { + && ((GLuint)(size + offset) <= bufObj->Size) ) { _mesa_memcpy( data, (GLubyte *) bufObj->Data + offset, size ); } } @@ -428,7 +428,7 @@ void _mesa_DeleteBuffersARB(GLsizei n, const GLuint *ids) { GET_CURRENT_CONTEXT(ctx); - unsigned i; + GLsizei i; ASSERT_OUTSIDE_BEGIN_END(ctx); if (n < 0) { diff --git a/src/mesa/main/program.c b/src/mesa/main/program.c index 0d1a53c7616..8cc5f6885a4 100644 --- a/src/mesa/main/program.c +++ b/src/mesa/main/program.c @@ -363,7 +363,7 @@ _mesa_lookup_parameter_value(struct program_parameter_list *paramList, /* name is not null-terminated, use nameLen */ for (i = 0; i < paramList->NumParameters; i++) { if (_mesa_strncmp(paramList->Parameters[i].Name, name, nameLen) == 0 - && _mesa_strlen(paramList->Parameters[i].Name) == nameLen) + && _mesa_strlen(paramList->Parameters[i].Name) == (size_t)nameLen) return paramList->Parameters[i].Values; } } @@ -392,7 +392,7 @@ _mesa_lookup_parameter_index(struct program_parameter_list *paramList, /* name is not null-terminated, use nameLen */ for (i = 0; i < (GLint) paramList->NumParameters; i++) { if (_mesa_strncmp(paramList->Parameters[i].Name, name, nameLen) == 0 - && _mesa_strlen(paramList->Parameters[i].Name) == nameLen) + && _mesa_strlen(paramList->Parameters[i].Name) == (size_t)nameLen) return i; } } |