avoid some gcc 4 compiler warnings

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17337 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2006-01-07 19:56:55 +00:00
parent c9c88c1530
commit 05db92a86c
1 changed files with 5 additions and 4 deletions

View File

@ -289,7 +289,7 @@ static const extfunc_desc_t extfuncs[] = {
static void getFunctions(void *(*getProcAddress)(const GLubyte *), static void getFunctions(void *(*getProcAddress)(const GLubyte *),
const char *ext2) { const char *ext2) {
const extfunc_desc_t *dsc; const extfunc_desc_t *dsc;
const char *extensions = glGetString(GL_EXTENSIONS); const char *extensions = (const char *)glGetString(GL_EXTENSIONS);
char *allexts; char *allexts;
if (!extensions) extensions = ""; if (!extensions) extensions = "";
if (!ext2) ext2 = ""; if (!ext2) ext2 = "";
@ -1015,7 +1015,7 @@ void swapGlBuffers() {
* *
* Copied from xine * Copied from xine
*/ */
static void *getdladdr(const GLubyte *s) { static void *getdladdr(const char *s) {
#ifdef HAVE_LIBDL #ifdef HAVE_LIBDL
#if defined(__sun) || defined(__sgi) #if defined(__sun) || defined(__sgi)
static void *handle = dlopen(NULL, RTLD_LAZY); static void *handle = dlopen(NULL, RTLD_LAZY);
@ -1097,8 +1097,9 @@ int setGlWindow(XVisualInfo **vinfo, GLXContext *context, Window win)
{ {
Window root; Window root;
int tmp; int tmp;
unsigned utmp;
XGetGeometry(mDisplay, vo_window, &root, &tmp, &tmp, XGetGeometry(mDisplay, vo_window, &root, &tmp, &tmp,
&vo_dwidth, &vo_dheight, &tmp, &tmp); (unsigned *)&vo_dwidth, (unsigned *)&vo_dheight, &utmp, &utmp);
} }
if (!keep_context) { if (!keep_context) {
void *(*getProcAddress)(const GLubyte *); void *(*getProcAddress)(const GLubyte *);
@ -1113,7 +1114,7 @@ int setGlWindow(XVisualInfo **vinfo, GLXContext *context, Window win)
if (!getProcAddress) if (!getProcAddress)
getProcAddress = getdladdr("glXGetProcAddressARB"); getProcAddress = getdladdr("glXGetProcAddressARB");
if (!getProcAddress) if (!getProcAddress)
getProcAddress = getdladdr; getProcAddress = (void *)getdladdr;
glXExtStr = getdladdr("glXQueryExtensionsString"); glXExtStr = getdladdr("glXQueryExtensionsString");
getFunctions(getProcAddress, !glXExtStr ? NULL : getFunctions(getProcAddress, !glXExtStr ? NULL :
glXExtStr(mDisplay, DefaultScreen(mDisplay))); glXExtStr(mDisplay, DefaultScreen(mDisplay)));