test: fix shadowing variables
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174
diff --git a/test/testdrawchessboard.c b/test/testdrawchessboard.c
index 7a11439..b16e61a 100644
--- a/test/testdrawchessboard.c
+++ b/test/testdrawchessboard.c
@@ -29,7 +29,7 @@ SDL_Surface *surface;
int done;
void
-DrawChessBoard(SDL_Renderer * renderer)
+DrawChessBoard()
{
int row = 0,column = 0,x = 0;
SDL_Rect rect, darea;
@@ -90,7 +90,7 @@ loop()
}
}
- DrawChessBoard(renderer);
+ DrawChessBoard();
/* Got everything on rendering surface,
now Update the drawing image on window screen */
diff --git a/test/testmultiaudio.c b/test/testmultiaudio.c
index 7310fa5..b2b5232 100644
--- a/test/testmultiaudio.c
+++ b/test/testmultiaudio.c
@@ -33,20 +33,20 @@ callback_data cbd[64];
void SDLCALL
play_through_once(void *arg, Uint8 * stream, int len)
{
- callback_data *cbd = (callback_data *) arg;
- Uint8 *waveptr = sound + cbd->soundpos;
- int waveleft = soundlen - cbd->soundpos;
+ callback_data *cbdata = (callback_data *) arg;
+ Uint8 *waveptr = sound + cbdata->soundpos;
+ int waveleft = soundlen - cbdata->soundpos;
int cpy = len;
if (cpy > waveleft)
cpy = waveleft;
SDL_memcpy(stream, waveptr, cpy);
len -= cpy;
- cbd->soundpos += cpy;
+ cbdata->soundpos += cpy;
if (len > 0) {
stream += cpy;
SDL_memset(stream, spec.silence, len);
- SDL_AtomicSet(&cbd->done, 1);
+ SDL_AtomicSet(&cbdata->done, 1);
}
}
diff --git a/test/testoverlay2.c b/test/testoverlay2.c
index ff7b7e6..6afac49 100644
--- a/test/testoverlay2.c
+++ b/test/testoverlay2.c
@@ -144,7 +144,6 @@ SDL_Texture *MooseTexture;
SDL_Rect displayrect;
int window_w;
int window_h;
-SDL_Window *window;
SDL_Renderer *renderer;
int paused = 0;
int i;
diff --git a/test/testrelative.c b/test/testrelative.c
index b5c237d..539ba0c 100644
--- a/test/testrelative.c
+++ b/test/testrelative.c
@@ -28,10 +28,10 @@ SDL_Rect rect;
SDL_Event event;
static void
-DrawRects(SDL_Renderer * renderer, SDL_Rect * rect)
+DrawRects(SDL_Renderer * renderer)
{
SDL_SetRenderDrawColor(renderer, 255, 0, 0, 255);
- SDL_RenderFillRect(renderer, rect);
+ SDL_RenderFillRect(renderer, &rect);
}
static void
@@ -63,7 +63,7 @@ loop(){
if (rect.x > viewport.x + viewport.w) rect.x -= viewport.w;
if (rect.y > viewport.y + viewport.h) rect.y -= viewport.h;
- DrawRects(renderer, &rect);
+ DrawRects(renderer);
SDL_RenderPresent(renderer);
}
diff --git a/test/testspriteminimal.c b/test/testspriteminimal.c
index d0d5287..6d10249 100644
--- a/test/testspriteminimal.c
+++ b/test/testspriteminimal.c
@@ -43,7 +43,7 @@ quit(int rc)
}
int
-LoadSprite(char *file, SDL_Renderer *renderer)
+LoadSprite(char *file)
{
SDL_Surface *temp;
@@ -92,7 +92,7 @@ LoadSprite(char *file, SDL_Renderer *renderer)
}
void
-MoveSprites(SDL_Renderer * renderer, SDL_Texture * sprite)
+MoveSprites()
{
int i;
int window_w = WINDOW_WIDTH;
@@ -136,7 +136,7 @@ void loop()
done = 1;
}
}
- MoveSprites(renderer, sprite);
+ MoveSprites();
#ifdef __EMSCRIPTEN__
if (done) {
emscripten_cancel_main_loop();
@@ -158,7 +158,7 @@ main(int argc, char *argv[])
quit(2);
}
- if (LoadSprite("icon.bmp", renderer) < 0) {
+ if (LoadSprite("icon.bmp") < 0) {
quit(2);
}
diff --git a/test/teststreaming.c b/test/teststreaming.c
index e50b4fb..9a0975f 100644
--- a/test/teststreaming.c
+++ b/test/teststreaming.c
@@ -67,7 +67,7 @@ void quit(int rc)
exit(rc);
}
-void UpdateTexture(SDL_Texture *texture, int frame)
+void UpdateTexture(SDL_Texture *texture)
{
SDL_Color *color;
Uint8 *src;
@@ -110,7 +110,7 @@ loop()
}
frame = (frame + 1) % MOOSEFRAMES_COUNT;
- UpdateTexture(MooseTexture, frame);
+ UpdateTexture(MooseTexture);
SDL_RenderClear(renderer);
SDL_RenderCopy(renderer, MooseTexture, NULL, NULL);
diff --git a/test/testviewport.c b/test/testviewport.c
index 279b5a4..0c8f255 100644
--- a/test/testviewport.c
+++ b/test/testviewport.c
@@ -92,7 +92,7 @@ LoadSprite(char *file, SDL_Renderer *renderer)
}
void
-DrawOnViewport(SDL_Renderer * renderer, SDL_Rect viewport)
+DrawOnViewport(SDL_Renderer * renderer)
{
SDL_Rect rect;
@@ -174,7 +174,7 @@ loop()
continue;
/* Draw using viewport */
- DrawOnViewport(state->renderers[i], viewport);
+ DrawOnViewport(state->renderers[i]);
/* Update the screen! */
if (use_target) {