Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mumble-voip/mumble.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Hacker <dd0t@users.sourceforge.net>2015-10-25 22:37:35 +0300
committerStefan Hacker <dd0t@users.sourceforge.net>2015-10-28 21:47:45 +0300
commit66ff6d6db45f179d3c11d34f2285718d9c5eceba (patch)
treeadfa0b3ac10cd8993624e4be5f30626fa62e902e /overlay_gl
parent39b8b07b30ebe12756dc69e18034305aa6edede8 (diff)
Fix warnings in overlay_gl C code
Diffstat (limited to 'overlay_gl')
-rw-r--r--overlay_gl/init_unix.c6
-rw-r--r--overlay_gl/overlay.c12
2 files changed, 9 insertions, 9 deletions
diff --git a/overlay_gl/init_unix.c b/overlay_gl/init_unix.c
index 208057e11..22ff9b126 100644
--- a/overlay_gl/init_unix.c
+++ b/overlay_gl/init_unix.c
@@ -102,15 +102,15 @@ void glXSwapBuffers(Display * dpy, GLXDrawable draw) {
}
if (c->bValid) {
- GLuint width, height;
+ int width, height;
if (c->bMesa) {
GLint viewport[4];
glGetIntegerv(GL_VIEWPORT, viewport);
width = viewport[2];
height = viewport[3];
} else {
- glXQueryDrawable(dpy, draw, GLX_WIDTH, (unsigned int *) &width);
- glXQueryDrawable(dpy, draw, GLX_HEIGHT, (unsigned int *) &height);
+ glXQueryDrawable(dpy, draw, GLX_WIDTH, (GLuint*)&width);
+ glXQueryDrawable(dpy, draw, GLX_HEIGHT, (GLuint*)&height);
}
drawContext(c, width, height);
diff --git a/overlay_gl/overlay.c b/overlay_gl/overlay.c
index 2384f693e..b63e54cd3 100644
--- a/overlay_gl/overlay.c
+++ b/overlay_gl/overlay.c
@@ -267,7 +267,7 @@ static void regenTexture(Context *ctx) {
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, ctx->uiWidth, ctx->uiHeight, 0, GL_BGRA, GL_UNSIGNED_BYTE, ctx->a_ucTexture);
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, (GLsizei)ctx->uiWidth, (GLsizei)ctx->uiHeight, 0, GL_BGRA, GL_UNSIGNED_BYTE, ctx->a_ucTexture);
}
static void drawOverlay(Context *ctx, unsigned int width, unsigned int height) {
@@ -294,7 +294,7 @@ static void drawOverlay(Context *ctx, unsigned int width, unsigned int height) {
om.omh.uiMagic = OVERLAY_MAGIC_NUMBER;
om.omh.uiType = OVERLAY_MSGTYPE_PID;
om.omh.iLength = sizeof(struct OverlayMsgPid);
- om.omp.pid = getpid();
+ om.omp.pid = (unsigned int)getpid(); // getpid can't fail
if (!sendMessage(ctx, &om))
return;
@@ -400,7 +400,7 @@ static void drawOverlay(Context *ctx, unsigned int width, unsigned int height) {
if ((omb->x == 0) && (omb->y == 0) && (omb->w == ctx->uiWidth) && (omb->h == ctx->uiHeight)) {
ods("Optimzied fullscreen blit");
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, ctx->uiWidth, ctx->uiHeight, 0, GL_BGRA, GL_UNSIGNED_BYTE, ctx->a_ucTexture);
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, (GLsizei)ctx->uiWidth, (GLsizei)ctx->uiHeight, 0, GL_BGRA, GL_UNSIGNED_BYTE, ctx->a_ucTexture);
} else {
// allocate temporary memory
unsigned int x = omb->x;
@@ -419,7 +419,7 @@ static void drawOverlay(Context *ctx, unsigned int width, unsigned int height) {
}
// copy temporary texture to opengl
- glTexSubImage2D(GL_TEXTURE_2D, 0, x, y, w, h, GL_BGRA, GL_UNSIGNED_BYTE, ptr);
+ glTexSubImage2D(GL_TEXTURE_2D, 0, (GLint)x, (GLint)y, (GLint)w, (GLint)h, GL_BGRA, GL_UNSIGNED_BYTE, ptr);
free(ptr);
}
}
@@ -604,7 +604,7 @@ static void drawContext(Context * ctx, int width, int height) {
glGetIntegerv(GL_MAX_TEXTURE_UNITS, &texunits);
for (i=texunits-1;i>=0;--i) {
- glActiveTexture(GL_TEXTURE0 + i);
+ glActiveTexture(GL_TEXTURE0 + (GLenum)i);
glDisable(GL_TEXTURE_1D);
glDisable(GL_TEXTURE_2D);
glDisable(GL_TEXTURE_3D);
@@ -652,7 +652,7 @@ static void drawContext(Context * ctx, int width, int height) {
glBindBuffer(GL_ARRAY_BUFFER, 0);
}
- drawOverlay(ctx, width, height);
+ drawOverlay(ctx, (unsigned int)width, (unsigned int)height);
if (bound != 0) {
glBindBuffer(GL_PIXEL_UNPACK_BUFFER_ARB, bound);