summaryrefslogtreecommitdiff
path: root/progs/xdemos
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2002-07-12 15:54:01 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2002-07-12 15:54:01 +0000
commitf02a5f6cc55fc61229a038ac72edb3ce97cb6950 (patch)
treeb3f3b47105dd5939751262bd880dc7821b435679 /progs/xdemos
parent902d2faadf37a5627ab2cbcd8993825c8749ec82 (diff)
Pedantic compiler fixes (Sven Panne)
Diffstat (limited to 'progs/xdemos')
-rw-r--r--progs/xdemos/glxinfo.c16
-rw-r--r--progs/xdemos/glxpixmap.c3
2 files changed, 10 insertions, 9 deletions
diff --git a/progs/xdemos/glxinfo.c b/progs/xdemos/glxinfo.c
index 00b4f0458a..72d0cb737d 100644
--- a/progs/xdemos/glxinfo.c
+++ b/progs/xdemos/glxinfo.c
@@ -1,4 +1,4 @@
-/* $Id: glxinfo.c,v 1.15 2002/03/08 19:44:28 brianp Exp $ */
+/* $Id: glxinfo.c,v 1.16 2002/07/12 15:54:02 brianp Exp $ */
/*
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
@@ -218,7 +218,7 @@ print_screen_info(Display *dpy, int scrnum, Bool allowDirect)
const char *gluExtensions = (const char *) gluGetString(GLU_EXTENSIONS);
#endif
/* Strip the screen number from the display name, if present. */
- if (!(displayName = malloc(strlen(DisplayString(dpy)) + 1))) {
+ if (!(displayName = (char *) malloc(strlen(DisplayString(dpy)) + 1))) {
fprintf(stderr, "Error: malloc() failed\n");
exit(1);
}
@@ -486,16 +486,16 @@ print_visual_attribs_long(const struct visual_attribs *attribs)
static void
print_visual_info(Display *dpy, int scrnum, InfoMode mode)
{
- XVisualInfo template;
+ XVisualInfo theTemplate;
XVisualInfo *visuals;
int numVisuals;
long mask;
int i;
/* get list of all visuals on this screen */
- template.screen = scrnum;
+ theTemplate.screen = scrnum;
mask = VisualScreenMask;
- visuals = XGetVisualInfo(dpy, mask, &template, &numVisuals);
+ visuals = XGetVisualInfo(dpy, mask, &theTemplate, &numVisuals);
if (mode == Verbose) {
for (i = 0; i < numVisuals; i++) {
@@ -569,7 +569,7 @@ mesa_hack(Display *dpy, int scrnum)
static int
find_best_visual(Display *dpy, int scrnum)
{
- XVisualInfo template;
+ XVisualInfo theTemplate;
XVisualInfo *visuals;
int numVisuals;
long mask;
@@ -577,9 +577,9 @@ find_best_visual(Display *dpy, int scrnum)
struct visual_attribs bestVis;
/* get list of all visuals on this screen */
- template.screen = scrnum;
+ theTemplate.screen = scrnum;
mask = VisualScreenMask;
- visuals = XGetVisualInfo(dpy, mask, &template, &numVisuals);
+ visuals = XGetVisualInfo(dpy, mask, &theTemplate, &numVisuals);
/* init bestVis with first visual info */
get_visual_attribs(dpy, &visuals[0], &bestVis);
diff --git a/progs/xdemos/glxpixmap.c b/progs/xdemos/glxpixmap.c
index f57b7b9a44..bde24ebcd0 100644
--- a/progs/xdemos/glxpixmap.c
+++ b/progs/xdemos/glxpixmap.c
@@ -1,4 +1,4 @@
-/* $Id: glxpixmap.c,v 1.2 2000/07/11 16:05:29 brianp Exp $ */
+/* $Id: glxpixmap.c,v 1.3 2002/07/12 15:54:02 brianp Exp $ */
/*
@@ -10,6 +10,7 @@
#include <GL/gl.h>
+#define GLX_GLXEXT_PROTOTYPES
#include <GL/glx.h>
#include <stdio.h>
#include <stdlib.h>