Readability: remove redundant return, continue, enum declaration
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
diff --git a/src/audio/alsa/SDL_alsa_audio.c b/src/audio/alsa/SDL_alsa_audio.c
index fba8d00..5eae5c2 100644
--- a/src/audio/alsa/SDL_alsa_audio.c
+++ b/src/audio/alsa/SDL_alsa_audio.c
@@ -340,7 +340,6 @@ swizzle_alsa_channels(_THIS, void *buffer, Uint32 bufferlen)
static void
no_swizzle(_THIS, void *buffer, Uint32 bufferlen)
{
- return;
}
#endif /* SND_CHMAP_API_VERSION */
diff --git a/src/joystick/SDL_gamecontroller.c b/src/joystick/SDL_gamecontroller.c
index a974bd4..012a459 100644
--- a/src/joystick/SDL_gamecontroller.c
+++ b/src/joystick/SDL_gamecontroller.c
@@ -881,7 +881,7 @@ SDL_PrivateAddMappingForGUID(SDL_JoystickGUID jGUID, const char *mappingString,
for ( pPrevMapping = s_pSupportedControllers, pCurrMapping = pPrevMapping->next;
pCurrMapping;
pPrevMapping = pCurrMapping, pCurrMapping = pCurrMapping->next ) {
- continue;
+ /* continue; */
}
pPrevMapping->next = pControllerMapping;
} else {
diff --git a/src/render/opengl/SDL_render_gl.c b/src/render/opengl/SDL_render_gl.c
index 06f69b4..ed6da08 100644
--- a/src/render/opengl/SDL_render_gl.c
+++ b/src/render/opengl/SDL_render_gl.c
@@ -180,7 +180,7 @@ GL_ClearErrors(SDL_Renderer *renderer)
}
} else if (data->glGetError != NULL) {
while (data->glGetError() != GL_NO_ERROR) {
- continue;
+ /* continue; */
}
}
}
diff --git a/src/render/opengles2/SDL_render_gles2.c b/src/render/opengles2/SDL_render_gles2.c
index e035c1f..e7425e4 100644
--- a/src/render/opengles2/SDL_render_gles2.c
+++ b/src/render/opengles2/SDL_render_gles2.c
@@ -208,7 +208,7 @@ GL_ClearErrors(SDL_Renderer *renderer)
return;
}
while (data->glGetError() != GL_NO_ERROR) {
- continue;
+ /* continue; */
}
}
diff --git a/src/video/SDL_blit_N.c b/src/video/SDL_blit_N.c
index 9313ee6..8950e36 100644
--- a/src/video/SDL_blit_N.c
+++ b/src/video/SDL_blit_N.c
@@ -2317,7 +2317,6 @@ get_permutation(SDL_PixelFormat *srcfmt, SDL_PixelFormat *dstfmt,
if (_alpha_channel) {
*_alpha_channel = alpha_channel;
}
- return;
}
@@ -3109,7 +3108,6 @@ Blit_3or4_to_3or4__same_rgb(SDL_BlitInfo * info)
dst += dstskip;
}
}
- return;
}
/* Blit_3or4_to_3or4__inversed_rgb: 3 or 4 bpp, inversed RGB triplet */
@@ -3214,7 +3212,6 @@ Blit_3or4_to_3or4__inversed_rgb(SDL_BlitInfo * info)
dst += dstskip;
}
}
- return;
}
/* Normal N to N optimized blitters */
diff --git a/src/video/wayland/SDL_waylandtouch.c b/src/video/wayland/SDL_waylandtouch.c
index 16d911e..ba913ef 100644
--- a/src/video/wayland/SDL_waylandtouch.c
+++ b/src/video/wayland/SDL_waylandtouch.c
@@ -192,7 +192,6 @@ WL_EXPORT const struct wl_interface qt_windowmanager_interface = {
/* wayland-qt-windowmanager.c ENDS */
/* wayland-qt-surface-extension.c BEGINS */
-extern const struct wl_interface qt_extended_surface_interface;
#ifndef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC
extern const struct wl_interface wl_surface_interface;
#endif