Skip to content

Commit

Permalink
testoverlay: Remove unused 'flip' variable.
Browse files Browse the repository at this point in the history
The testoverlay SDL 1.2 test program has a variable 'flip' which is
never used. It seems to be intended to be used for double-buffering/page
flipping, but it's never read from after it's set.

This results in a warning being printed on gcc 10.3:
/home/david/Development/sdl12-compat/test/testoverlay.c: In function ‘main’:
/home/david/Development/sdl12-compat/test/testoverlay.c:324:6: warning: variable ‘flip’ set but not used [-Wunused-but-set-variable]
  • Loading branch information
sulix authored and ccawley2011 committed Sep 23, 2022
1 parent b151133 commit 9601883
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions test/testoverlay.c
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,6 @@ static void PrintUsage(char *argv0)
int main(int argc, char **argv)
{
char *argv0 = argv[0];
int flip;
int delay;
int desired_bpp;
Uint32 video_flags, overlay_format;
Expand All @@ -332,7 +331,6 @@ int main(int argc, char **argv)
int i;

/* Set default options and check command-line */
flip = 0;
scale=0;
monochrome=0;
luminance=100;
Expand Down Expand Up @@ -473,7 +471,6 @@ int main(int argc, char **argv)
(screen->flags&SDL_HWSURFACE) ? "video" : "system");
if ( screen->flags & SDL_DOUBLEBUF ) {
printf("Double-buffering enabled\n");
flip = 1;
}

/* Set the window manager title bar */
Expand Down

0 comments on commit 9601883

Please sign in to comment.