Skip to content

Commit

Permalink
Fixed bug 3939 - Remove static vm_error and vm_event from SDL_x11modes.c
Browse files Browse the repository at this point in the history
tomwardio

Remove static int vm_error and vm_event, use local variables instead.

This fixes unused variable errors when compiling with SDL_VIDEO_DRIVER_X11_XINERAMA undefined.

src/video/x11/SDL_x11modes.c:505:22: error: unused variable 'vm_error' [-Werror,-Wunused-variable]

src/video/x11/SDL_x11modes.c:505:12: error: unused variable 'vm_event' [-Werror,-Wunused-variable]
  • Loading branch information
slouken committed Nov 5, 2017
1 parent 50e422a commit c5429bd
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/video/x11/SDL_x11modes.c
Expand Up @@ -148,9 +148,6 @@ X11_GetPixelFormatFromVisualInfo(Display * display, XVisualInfo * vinfo)
return SDL_PIXELFORMAT_UNKNOWN;
}

/* Global for the error handler */
static int vm_event, vm_error = -1;

#if SDL_VIDEO_DRIVER_X11_XINERAMA
static SDL_bool
CheckXinerama(Display * display, int *major, int *minor)
Expand Down Expand Up @@ -509,6 +506,7 @@ X11_InitModes_XRandR(_THIS)
static SDL_bool
CheckVidMode(Display * display, int *major, int *minor)
{
int vm_event, vm_error = -1;
/* Default the extension not available */
*major = *minor = 0;

Expand All @@ -528,7 +526,6 @@ CheckVidMode(Display * display, int *major, int *minor)
}

/* Query the extension version */
vm_error = -1;
if (!X11_XF86VidModeQueryExtension(display, &vm_event, &vm_error)
|| !X11_XF86VidModeQueryVersion(display, major, minor)) {
#ifdef X11MODES_DEBUG
Expand Down

0 comments on commit c5429bd

Please sign in to comment.