Sfoglia il codice sorgente

Fix warnings: Extra semi - macro usage (#15015)

RaceTheMaSe 1 mese fa
parent
commit
f1a7a64eb4

+ 2 - 2
src/audio/SDL_audiotypecvt.c

@@ -938,7 +938,7 @@ void SDL_ChooseAudioConverters(void)
 
 #define SET_CONVERTER_FUNCS(fntype) \
     SDL_Convert_Swap16 = SDL_Convert_Swap16_##fntype; \
-    SDL_Convert_Swap32 = SDL_Convert_Swap32_##fntype;
+    SDL_Convert_Swap32 = SDL_Convert_Swap32_##fntype
 
 #ifdef SDL_SSE4_1_INTRINSICS
     if (SDL_HasSSE41()) {
@@ -964,7 +964,7 @@ void SDL_ChooseAudioConverters(void)
     SDL_Convert_F32_to_S8 = SDL_Convert_F32_to_S8_##fntype; \
     SDL_Convert_F32_to_U8 = SDL_Convert_F32_to_U8_##fntype; \
     SDL_Convert_F32_to_S16 = SDL_Convert_F32_to_S16_##fntype; \
-    SDL_Convert_F32_to_S32 = SDL_Convert_F32_to_S32_##fntype; \
+    SDL_Convert_F32_to_S32 = SDL_Convert_F32_to_S32_##fntype \
 
 #ifdef SDL_SSE2_INTRINSICS
     if (SDL_HasSSE2()) {

+ 1 - 1
src/core/windows/SDL_windows.c

@@ -329,7 +329,7 @@ static BOOL IsWindowsBuildVersionAtLeast(DWORD dwBuildNumber)
             result = (test); \
             checked = true; \
         } \
-        return result;
+        return result
 #endif
 
 BOOL WIN_IsWine(void)

+ 3 - 3
src/events/SDL_events.c

@@ -793,7 +793,7 @@ int SDL_GetEventDescription(const SDL_Event *event, char *buf, int buflen)
 #define PRINT_PTOUCH_EVENT(event)                                                                             \
     (void)SDL_snprintf(details, sizeof(details), " (timestamp=%" SDL_PRIu64 " windowid=%u which=%u pen_state=%u x=%g y=%g eraser=%s state=%s)", \
                        event->ptouch.timestamp, (uint)event->ptouch.windowID, (uint)event->ptouch.which, (uint)event->ptouch.pen_state, event->ptouch.x, event->ptouch.y, \
-                       event->ptouch.eraser ? "yes" : "no", event->ptouch.down ? "down" : "up");
+                       event->ptouch.eraser ? "yes" : "no", event->ptouch.down ? "down" : "up")
         SDL_EVENT_CASE(SDL_EVENT_PEN_DOWN)
         PRINT_PTOUCH_EVENT(event);
         break;
@@ -804,7 +804,7 @@ int SDL_GetEventDescription(const SDL_Event *event, char *buf, int buflen)
 
 #define PRINT_PPROXIMITY_EVENT(event)                                                                             \
     (void)SDL_snprintf(details, sizeof(details), " (timestamp=%" SDL_PRIu64 " windowid=%u which=%u)", \
-                       event->pproximity.timestamp, (uint)event->pproximity.windowID, (uint)event->pproximity.which);
+                       event->pproximity.timestamp, (uint)event->pproximity.windowID, (uint)event->pproximity.which)
         SDL_EVENT_CASE(SDL_EVENT_PEN_PROXIMITY_IN)
         PRINT_PPROXIMITY_EVENT(event);
         break;
@@ -827,7 +827,7 @@ int SDL_GetEventDescription(const SDL_Event *event, char *buf, int buflen)
 #define PRINT_PBUTTON_EVENT(event)                                                                                                               \
     (void)SDL_snprintf(details, sizeof(details), " (timestamp=%" SDL_PRIu64 " windowid=%u which=%u pen_state=%u x=%g y=%g button=%u state=%s)", \
                        event->pbutton.timestamp, (uint)event->pbutton.windowID, (uint)event->pbutton.which, (uint)event->pbutton.pen_state, event->pbutton.x, event->pbutton.y, \
-                       (uint)event->pbutton.button, event->pbutton.down ? "down" : "up");
+                       (uint)event->pbutton.button, event->pbutton.down ? "down" : "up")
         SDL_EVENT_CASE(SDL_EVENT_PEN_BUTTON_DOWN)
         PRINT_PBUTTON_EVENT(event);
         break;

+ 25 - 25
src/gpu/SDL_gpu.c

@@ -943,7 +943,7 @@ bool SDL_GPUTextureSupportsFormat(
     CHECK_DEVICE_MAGIC(device, false);
 
     if (device->debug_mode) {
-        CHECK_TEXTUREFORMAT_ENUM_INVALID(format, false)
+        CHECK_TEXTUREFORMAT_ENUM_INVALID(format, false);
     }
 
     if ((usage & SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_WRITE) ||
@@ -968,7 +968,7 @@ bool SDL_GPUTextureSupportsSampleCount(
     CHECK_DEVICE_MAGIC(device, 0);
 
     if (device->debug_mode) {
-        CHECK_TEXTUREFORMAT_ENUM_INVALID(format, 0)
+        CHECK_TEXTUREFORMAT_ENUM_INVALID(format, 0);
     }
 
     return device->SupportsSampleCount(
@@ -1078,12 +1078,12 @@ SDL_GPUGraphicsPipeline *SDL_CreateGPUGraphicsPipeline(
             }
             if (graphicsPipelineCreateInfo->target_info.color_target_descriptions[i].blend_state.enable_blend) {
                 const SDL_GPUColorTargetBlendState *blend_state = &graphicsPipelineCreateInfo->target_info.color_target_descriptions[i].blend_state;
-                CHECK_BLENDFACTOR_ENUM_INVALID(blend_state->src_color_blendfactor, NULL)
-                CHECK_BLENDFACTOR_ENUM_INVALID(blend_state->dst_color_blendfactor, NULL)
-                CHECK_BLENDOP_ENUM_INVALID(blend_state->color_blend_op, NULL)
-                CHECK_BLENDFACTOR_ENUM_INVALID(blend_state->src_alpha_blendfactor, NULL)
-                CHECK_BLENDFACTOR_ENUM_INVALID(blend_state->dst_alpha_blendfactor, NULL)
-                CHECK_BLENDOP_ENUM_INVALID(blend_state->alpha_blend_op, NULL)
+                CHECK_BLENDFACTOR_ENUM_INVALID(blend_state->src_color_blendfactor, NULL);
+                CHECK_BLENDFACTOR_ENUM_INVALID(blend_state->dst_color_blendfactor, NULL);
+                CHECK_BLENDOP_ENUM_INVALID(blend_state->color_blend_op, NULL);
+                CHECK_BLENDFACTOR_ENUM_INVALID(blend_state->src_alpha_blendfactor, NULL);
+                CHECK_BLENDFACTOR_ENUM_INVALID(blend_state->dst_alpha_blendfactor, NULL);
+                CHECK_BLENDOP_ENUM_INVALID(blend_state->alpha_blend_op, NULL);
 
                 // TODO: validate that format support blending?
             }
@@ -1156,14 +1156,14 @@ SDL_GPUGraphicsPipeline *SDL_CreateGPUGraphicsPipeline(
             return NULL;
         }
         if (graphicsPipelineCreateInfo->depth_stencil_state.enable_depth_test) {
-            CHECK_COMPAREOP_ENUM_INVALID(graphicsPipelineCreateInfo->depth_stencil_state.compare_op, NULL)
+            CHECK_COMPAREOP_ENUM_INVALID(graphicsPipelineCreateInfo->depth_stencil_state.compare_op, NULL);
         }
         if (graphicsPipelineCreateInfo->depth_stencil_state.enable_stencil_test) {
             const SDL_GPUStencilOpState *stencil_state = &graphicsPipelineCreateInfo->depth_stencil_state.back_stencil_state;
-            CHECK_COMPAREOP_ENUM_INVALID(stencil_state->compare_op, NULL)
-            CHECK_STENCILOP_ENUM_INVALID(stencil_state->fail_op, NULL)
-            CHECK_STENCILOP_ENUM_INVALID(stencil_state->pass_op, NULL)
-            CHECK_STENCILOP_ENUM_INVALID(stencil_state->depth_fail_op, NULL)
+            CHECK_COMPAREOP_ENUM_INVALID(stencil_state->compare_op, NULL);
+            CHECK_STENCILOP_ENUM_INVALID(stencil_state->fail_op, NULL);
+            CHECK_STENCILOP_ENUM_INVALID(stencil_state->pass_op, NULL);
+            CHECK_STENCILOP_ENUM_INVALID(stencil_state->depth_fail_op, NULL);
         }
 
         if (device->validate_feature_depth_clamp_disabled &&
@@ -1267,7 +1267,7 @@ SDL_GPUTexture *SDL_CreateGPUTexture(
         const Uint32 MAX_3D_DIMENSION = 2048;
 
         // Common checks for all texture types
-        CHECK_TEXTUREFORMAT_ENUM_INVALID(createinfo->format, NULL)
+        CHECK_TEXTUREFORMAT_ENUM_INVALID(createinfo->format, NULL);
 
         if (createinfo->width <= 0 || createinfo->height <= 0 || createinfo->layer_count_or_depth <= 0) {
             SDL_assert_release(!"For any texture: width, height, and layer_count_or_depth must be >= 1");
@@ -1815,7 +1815,7 @@ SDL_GPURenderPass *SDL_BeginGPURenderPass(
 
     if (COMMAND_BUFFER_DEVICE->debug_mode) {
         CHECK_COMMAND_BUFFER_RETURN_NULL
-        CHECK_ANY_PASS_IN_PROGRESS("Cannot begin render pass during another pass!", NULL)
+        CHECK_ANY_PASS_IN_PROGRESS("Cannot begin render pass during another pass!", NULL);
 
         for (Uint32 i = 0; i < num_color_targets; i += 1) {
             TextureCommonHeader *textureHeader = (TextureCommonHeader *)color_target_infos[i].texture;
@@ -2464,7 +2464,7 @@ SDL_GPUComputePass *SDL_BeginGPUComputePass(
 
     if (COMMAND_BUFFER_DEVICE->debug_mode) {
         CHECK_COMMAND_BUFFER_RETURN_NULL
-        CHECK_ANY_PASS_IN_PROGRESS("Cannot begin compute pass during another pass!", NULL)
+        CHECK_ANY_PASS_IN_PROGRESS("Cannot begin compute pass during another pass!", NULL);
 
         for (Uint32 i = 0; i < num_storage_texture_bindings; i += 1) {
             TextureCommonHeader *header = (TextureCommonHeader *)storage_texture_bindings[i].texture;
@@ -2765,7 +2765,7 @@ SDL_GPUCopyPass *SDL_BeginGPUCopyPass(
 
     if (COMMAND_BUFFER_DEVICE->debug_mode) {
         CHECK_COMMAND_BUFFER_RETURN_NULL
-        CHECK_ANY_PASS_IN_PROGRESS("Cannot begin copy pass during another pass!", NULL)
+        CHECK_ANY_PASS_IN_PROGRESS("Cannot begin copy pass during another pass!", NULL);
     }
 
     COMMAND_BUFFER_DEVICE->BeginCopyPass(
@@ -3054,7 +3054,7 @@ void SDL_GenerateMipmapsForGPUTexture(
 
     if (COMMAND_BUFFER_DEVICE->debug_mode) {
         CHECK_COMMAND_BUFFER
-        CHECK_ANY_PASS_IN_PROGRESS("Cannot generate mipmaps during a pass!", )
+        CHECK_ANY_PASS_IN_PROGRESS("Cannot generate mipmaps during a pass!", );
 
         TextureCommonHeader *header = (TextureCommonHeader *)texture;
         if (header->info.num_levels <= 1) {
@@ -3096,7 +3096,7 @@ void SDL_BlitGPUTexture(
 
     if (COMMAND_BUFFER_DEVICE->debug_mode) {
         CHECK_COMMAND_BUFFER
-        CHECK_ANY_PASS_IN_PROGRESS("Cannot blit during a pass!", )
+        CHECK_ANY_PASS_IN_PROGRESS("Cannot blit during a pass!", );
 
         // Validation
         bool failed = false;
@@ -3157,7 +3157,7 @@ bool SDL_WindowSupportsGPUSwapchainComposition(
     }
 
     if (device->debug_mode) {
-        CHECK_SWAPCHAINCOMPOSITION_ENUM_INVALID(swapchain_composition, false)
+        CHECK_SWAPCHAINCOMPOSITION_ENUM_INVALID(swapchain_composition, false);
     }
 
     return device->SupportsSwapchainComposition(
@@ -3179,7 +3179,7 @@ bool SDL_WindowSupportsGPUPresentMode(
     }
 
     if (device->debug_mode) {
-        CHECK_PRESENTMODE_ENUM_INVALID(present_mode, false)
+        CHECK_PRESENTMODE_ENUM_INVALID(present_mode, false);
     }
 
     return device->SupportsPresentMode(
@@ -3237,8 +3237,8 @@ bool SDL_SetGPUSwapchainParameters(
     }
 
     if (device->debug_mode) {
-        CHECK_SWAPCHAINCOMPOSITION_ENUM_INVALID(swapchain_composition, false)
-        CHECK_PRESENTMODE_ENUM_INVALID(present_mode, false)
+        CHECK_SWAPCHAINCOMPOSITION_ENUM_INVALID(swapchain_composition, false);
+        CHECK_PRESENTMODE_ENUM_INVALID(present_mode, false);
     }
 
     return device->SetSwapchainParameters(
@@ -3305,7 +3305,7 @@ bool SDL_AcquireGPUSwapchainTexture(
 
     if (COMMAND_BUFFER_DEVICE->debug_mode) {
         CHECK_COMMAND_BUFFER_RETURN_FALSE
-        CHECK_ANY_PASS_IN_PROGRESS("Cannot acquire a swapchain texture during a pass!", false)
+        CHECK_ANY_PASS_IN_PROGRESS("Cannot acquire a swapchain texture during a pass!", false);
     }
 
     bool result = COMMAND_BUFFER_DEVICE->AcquireSwapchainTexture(
@@ -3358,7 +3358,7 @@ bool SDL_WaitAndAcquireGPUSwapchainTexture(
 
     if (COMMAND_BUFFER_DEVICE->debug_mode) {
         CHECK_COMMAND_BUFFER_RETURN_FALSE
-        CHECK_ANY_PASS_IN_PROGRESS("Cannot acquire a swapchain texture during a pass!", false)
+        CHECK_ANY_PASS_IN_PROGRESS("Cannot acquire a swapchain texture during a pass!", false);
     }
 
     bool result = COMMAND_BUFFER_DEVICE->WaitAndAcquireSwapchainTexture(

+ 6 - 6
src/gpu/vulkan/SDL_gpu_vulkan.c

@@ -2434,7 +2434,7 @@ static Uint8 VULKAN_INTERNAL_BindMemoryForBuffer(
     }                                                           \
     commandBuffer->array[commandBuffer->count] = resource;      \
     commandBuffer->count += 1;                                  \
-    SDL_AtomicIncRef(&resource->referenceCount);
+    SDL_AtomicIncRef(&resource->referenceCount)
 
 static void VULKAN_INTERNAL_TrackBuffer(
     VulkanCommandBuffer *commandBuffer,
@@ -2445,7 +2445,7 @@ static void VULKAN_INTERNAL_TrackBuffer(
         VulkanBuffer *,
         usedBuffers,
         usedBufferCount,
-        usedBufferCapacity)
+        usedBufferCapacity);
 }
 
 static void VULKAN_INTERNAL_TrackTexture(
@@ -2457,7 +2457,7 @@ static void VULKAN_INTERNAL_TrackTexture(
         VulkanTexture *,
         usedTextures,
         usedTextureCount,
-        usedTextureCapacity)
+        usedTextureCapacity);
 }
 
 static void VULKAN_INTERNAL_TrackSampler(
@@ -2469,7 +2469,7 @@ static void VULKAN_INTERNAL_TrackSampler(
         VulkanSampler *,
         usedSamplers,
         usedSamplerCount,
-        usedSamplerCapacity)
+        usedSamplerCapacity);
 }
 
 static void VULKAN_INTERNAL_TrackGraphicsPipeline(
@@ -2481,7 +2481,7 @@ static void VULKAN_INTERNAL_TrackGraphicsPipeline(
         VulkanGraphicsPipeline *,
         usedGraphicsPipelines,
         usedGraphicsPipelineCount,
-        usedGraphicsPipelineCapacity)
+        usedGraphicsPipelineCapacity);
 }
 
 static void VULKAN_INTERNAL_TrackComputePipeline(
@@ -2493,7 +2493,7 @@ static void VULKAN_INTERNAL_TrackComputePipeline(
         VulkanComputePipeline *,
         usedComputePipelines,
         usedComputePipelineCount,
-        usedComputePipelineCapacity)
+        usedComputePipelineCapacity);
 }
 
 static void VULKAN_INTERNAL_TrackFramebuffer(

+ 1 - 1
src/hidapi/windows/hid.c

@@ -146,7 +146,7 @@ static int lookup_functions(void)
 		goto err;
 	}
 
-#define RESOLVE(lib_handle, x) x = (x##_)GetProcAddress(lib_handle, #x); if (!x) goto err;
+#define RESOLVE(lib_handle, x) x = (x##_)GetProcAddress(lib_handle, #x); if (!x) goto err
 
 	RESOLVE(hid_lib_handle, HidD_GetHidGuid);
 	RESOLVE(hid_lib_handle, HidD_GetAttributes);

+ 1 - 1
src/joystick/hidapi/SDL_hidapi_steam.c

@@ -539,7 +539,7 @@ static bool ResetSteamController(SDL_HIDAPI_Device *dev, bool bSuppressErrorSpew
     buf[3 + nSettings * 3] = SETTING;                      \
     buf[3 + nSettings * 3 + 1] = ((uint16_t)VALUE) & 0xFF; \
     buf[3 + nSettings * 3 + 2] = ((uint16_t)VALUE) >> 8;   \
-    ++nSettings;
+    ++nSettings
 
     SDL_zero(buf);
     buf[1] = ID_SET_SETTINGS_VALUES;

+ 1 - 1
src/joystick/windows/SDL_windows_gaming_input.c

@@ -595,7 +595,7 @@ static bool WGI_JoystickInit(void)
     }
     wgi.ro_initialized = true;
 
-#define RESOLVE(x) wgi.x = (x##_t)WIN_LoadComBaseFunction(#x); if (!wgi.x) return WIN_SetError("GetProcAddress failed for " #x);
+#define RESOLVE(x) wgi.x = (x##_t)WIN_LoadComBaseFunction(#x); if (!wgi.x) return WIN_SetError("GetProcAddress failed for " #x)
     RESOLVE(CoIncrementMTAUsage);
     RESOLVE(RoGetActivationFactory);
     RESOLVE(WindowsCreateStringReference);

+ 3 - 3
src/render/SDL_render.c

@@ -3292,7 +3292,7 @@ bool SDL_GetRenderSafeArea(SDL_Renderer *renderer, SDL_Rect *rect)
 
 bool SDL_SetRenderClipRect(SDL_Renderer *renderer, const SDL_Rect *rect)
 {
-    CHECK_RENDERER_MAGIC(renderer, false)
+    CHECK_RENDERER_MAGIC(renderer, false);
 
     SDL_RenderViewState *view = renderer->view;
     if (rect && rect->w >= 0 && rect->h >= 0) {
@@ -3313,7 +3313,7 @@ bool SDL_GetRenderClipRect(SDL_Renderer *renderer, SDL_Rect *rect)
         SDL_zerop(rect);
     }
 
-    CHECK_RENDERER_MAGIC(renderer, false)
+    CHECK_RENDERER_MAGIC(renderer, false);
 
     if (rect) {
         SDL_copyp(rect, &renderer->view->clip_rect);
@@ -3323,7 +3323,7 @@ bool SDL_GetRenderClipRect(SDL_Renderer *renderer, SDL_Rect *rect)
 
 bool SDL_RenderClipEnabled(SDL_Renderer *renderer)
 {
-    CHECK_RENDERER_MAGIC(renderer, false)
+    CHECK_RENDERER_MAGIC(renderer, false);
     return renderer->view->clipping_enabled;
 }
 

+ 12 - 12
src/render/software/SDL_triangle.c

@@ -330,12 +330,12 @@ bool SDL_SW_FillTriangle(SDL_Surface *dst, SDL_Point *d0, SDL_Point *d1, SDL_Poi
 
     {
         int val;
-        PRECOMP(d2d1_y, d1->y - d2->y)
-        PRECOMP(d0d2_y, d2->y - d0->y)
-        PRECOMP(d1d0_y, d0->y - d1->y)
-        PRECOMP(d1d2_x, d2->x - d1->x)
-        PRECOMP(d2d0_x, d0->x - d2->x)
-        PRECOMP(d0d1_x, d1->x - d0->x)
+        PRECOMP(d2d1_y, d1->y - d2->y);
+        PRECOMP(d0d2_y, d2->y - d0->y);
+        PRECOMP(d1d0_y, d0->y - d1->y);
+        PRECOMP(d1d2_x, d2->x - d1->x);
+        PRECOMP(d2d0_x, d0->x - d2->x);
+        PRECOMP(d0d1_x, d1->x - d0->x);
     }
 
     // Starting point for rendering, at the middle of a pixel
@@ -572,12 +572,12 @@ bool SDL_SW_BlitTriangle(
 
     {
         int val;
-        PRECOMP(d2d1_y, d1->y - d2->y)
-        PRECOMP(d0d2_y, d2->y - d0->y)
-        PRECOMP(d1d0_y, d0->y - d1->y)
-        PRECOMP(d1d2_x, d2->x - d1->x)
-        PRECOMP(d2d0_x, d0->x - d2->x)
-        PRECOMP(d0d1_x, d1->x - d0->x)
+        PRECOMP(d2d1_y, d1->y - d2->y);
+        PRECOMP(d0d2_y, d2->y - d0->y);
+        PRECOMP(d1d0_y, d0->y - d1->y);
+        PRECOMP(d1d2_x, d2->x - d1->x);
+        PRECOMP(d2d0_x, d0->x - d2->x);
+        PRECOMP(d0d1_x, d1->x - d0->x);
     }
 
     s2s0_x = s0->x - s2->x;

+ 1 - 1
src/video/SDL_egl.c

@@ -178,7 +178,7 @@ static const char *SDL_EGL_GetErrorName(EGLint eglErrorCode)
 {
 #define SDL_EGL_ERROR_TRANSLATE(e) \
     case e:                        \
-        return #e;
+        return #e
     switch (eglErrorCode) {
         SDL_EGL_ERROR_TRANSLATE(EGL_SUCCESS);
         SDL_EGL_ERROR_TRANSLATE(EGL_NOT_INITIALIZED);

+ 2 - 2
src/video/SDL_fillrect.c

@@ -31,7 +31,7 @@
     c128.m128_u32[0] = color; \
     c128.m128_u32[1] = color; \
     c128.m128_u32[2] = color; \
-    c128.m128_u32[3] = color;
+    c128.m128_u32[3] = color
 #else
 #define SSE_BEGIN \
     __m128 c128; \
@@ -40,7 +40,7 @@
     cccc[1] = color; \
     cccc[2] = color; \
     cccc[3] = color; \
-    c128 = *(__m128 *)cccc;
+    c128 = *(__m128 *)cccc
 #endif
 
 #define SSE_WORK \

+ 3 - 3
src/video/SDL_video.c

@@ -3571,7 +3571,7 @@ bool SDL_SetWindowFullscreen(SDL_Window *window, bool fullscreen)
 
 bool SDL_SyncWindow(SDL_Window *window)
 {
-    CHECK_WINDOW_MAGIC(window, false)
+    CHECK_WINDOW_MAGIC(window, false);
 
     if (_this->SyncWindow) {
         return _this->SyncWindow(_this, window);
@@ -6104,8 +6104,8 @@ bool SDL_ShouldAllowTopmost(void)
 
 bool SDL_ShowWindowSystemMenu(SDL_Window *window, int x, int y)
 {
-    CHECK_WINDOW_MAGIC(window, false)
-    CHECK_WINDOW_NOT_POPUP(window, false)
+    CHECK_WINDOW_MAGIC(window, false);
+    CHECK_WINDOW_NOT_POPUP(window, false);
 
     if (_this->ShowWindowSystemMenu) {
         _this->ShowWindowSystemMenu(window, x, y);

+ 9 - 9
src/video/SDL_yuv.c

@@ -735,27 +735,27 @@ static bool SDL_ConvertPixels_XRGB8888_to_YUV(int width, int height, const void
     const Uint32 p4 = ((const Uint32 *)next_row)[2 * i + 1];                                                \
     const Uint32 r = ((p1 & 0x00ff0000) + (p2 & 0x00ff0000) + (p3 & 0x00ff0000) + (p4 & 0x00ff0000)) >> 18; \
     const Uint32 g = ((p1 & 0x0000ff00) + (p2 & 0x0000ff00) + (p3 & 0x0000ff00) + (p4 & 0x0000ff00)) >> 10; \
-    const Uint32 b = ((p1 & 0x000000ff) + (p2 & 0x000000ff) + (p3 & 0x000000ff) + (p4 & 0x000000ff)) >> 2;
+    const Uint32 b = ((p1 & 0x000000ff) + (p2 & 0x000000ff) + (p3 & 0x000000ff) + (p4 & 0x000000ff)) >> 2
 
 #define READ_2x1_PIXELS                                             \
     const Uint32 p1 = ((const Uint32 *)curr_row)[2 * i];            \
     const Uint32 p2 = ((const Uint32 *)next_row)[2 * i];            \
     const Uint32 r = ((p1 & 0x00ff0000) + (p2 & 0x00ff0000)) >> 17; \
     const Uint32 g = ((p1 & 0x0000ff00) + (p2 & 0x0000ff00)) >> 9;  \
-    const Uint32 b = ((p1 & 0x000000ff) + (p2 & 0x000000ff)) >> 1;
+    const Uint32 b = ((p1 & 0x000000ff) + (p2 & 0x000000ff)) >> 1
 
 #define READ_1x2_PIXELS                                             \
     const Uint32 p1 = ((const Uint32 *)curr_row)[2 * i];            \
     const Uint32 p2 = ((const Uint32 *)curr_row)[2 * i + 1];        \
     const Uint32 r = ((p1 & 0x00ff0000) + (p2 & 0x00ff0000)) >> 17; \
     const Uint32 g = ((p1 & 0x0000ff00) + (p2 & 0x0000ff00)) >> 9;  \
-    const Uint32 b = ((p1 & 0x000000ff) + (p2 & 0x000000ff)) >> 1;
+    const Uint32 b = ((p1 & 0x000000ff) + (p2 & 0x000000ff)) >> 1
 
 #define READ_1x1_PIXEL                                  \
     const Uint32 p = ((const Uint32 *)curr_row)[2 * i]; \
     const Uint32 r = (p & 0x00ff0000) >> 16;            \
     const Uint32 g = (p & 0x0000ff00) >> 8;             \
-    const Uint32 b = (p & 0x000000ff);
+    const Uint32 b = (p & 0x000000ff)
 
 #define READ_TWO_RGB_PIXELS                                  \
     const Uint32 p = ((const Uint32 *)curr_row)[2 * i];      \
@@ -768,7 +768,7 @@ static bool SDL_ConvertPixels_XRGB8888_to_YUV(int width, int height, const void
     const Uint32 b1 = (p1 & 0x000000ff);                     \
     const Uint32 R = (r + r1) / 2;                           \
     const Uint32 G = (g + g1) / 2;                           \
-    const Uint32 B = (b + b1) / 2;
+    const Uint32 B = (b + b1) / 2
 
 #define READ_ONE_RGB_PIXEL READ_1x1_PIXEL
 
@@ -1026,27 +1026,27 @@ static bool SDL_ConvertPixels_XBGR2101010_to_P010(int width, int height, const v
     const Uint32 p4 = ((const Uint32 *)next_row)[2 * i + 1];                                                \
     const Uint32 r = ((p1 & 0x000003ff) + (p2 & 0x000003ff) + (p3 & 0x000003ff) + (p4 & 0x000003ff)) >> 2;  \
     const Uint32 g = ((p1 & 0x000ffc00) + (p2 & 0x000ffc00) + (p3 & 0x000ffc00) + (p4 & 0x000ffc00)) >> 12; \
-    const Uint32 b = ((p1 & 0x3ff00000) + (p2 & 0x3ff00000) + (p3 & 0x3ff00000) + (p4 & 0x3ff00000)) >> 22;
+    const Uint32 b = ((p1 & 0x3ff00000) + (p2 & 0x3ff00000) + (p3 & 0x3ff00000) + (p4 & 0x3ff00000)) >> 22
 
 #define READ_2x1_PIXELS                                             \
     const Uint32 p1 = ((const Uint32 *)curr_row)[2 * i];            \
     const Uint32 p2 = ((const Uint32 *)next_row)[2 * i];            \
     const Uint32 r = ((p1 & 0x000003ff) + (p2 & 0x000003ff)) >> 1;  \
     const Uint32 g = ((p1 & 0x000ffc00) + (p2 & 0x000ffc00)) >> 11; \
-    const Uint32 b = ((p1 & 0x3ff00000) + (p2 & 0x3ff00000)) >> 21;
+    const Uint32 b = ((p1 & 0x3ff00000) + (p2 & 0x3ff00000)) >> 21
 
 #define READ_1x2_PIXELS                                             \
     const Uint32 p1 = ((const Uint32 *)curr_row)[2 * i];            \
     const Uint32 p2 = ((const Uint32 *)curr_row)[2 * i + 1];        \
     const Uint32 r = ((p1 & 0x000003ff) + (p2 & 0x000003ff)) >> 1;  \
     const Uint32 g = ((p1 & 0x000ffc00) + (p2 & 0x000ffc00)) >> 11; \
-    const Uint32 b = ((p1 & 0x3ff00000) + (p2 & 0x3ff00000)) >> 21;
+    const Uint32 b = ((p1 & 0x3ff00000) + (p2 & 0x3ff00000)) >> 21
 
 #define READ_1x1_PIXEL                                  \
     const Uint32 p = ((const Uint32 *)curr_row)[2 * i]; \
     const Uint32 r = (p & 0x000003ff);                  \
     const Uint32 g = (p & 0x000ffc00) >> 10;            \
-    const Uint32 b = (p & 0x3ff00000) >> 20;
+    const Uint32 b = (p & 0x3ff00000) >> 20
 
     const Uint8 *curr_row, *next_row;
 

+ 2 - 2
src/video/x11/SDL_x11toolkit.c

@@ -951,8 +951,8 @@ SDL_ToolkitWindowX11 *X11Toolkit_CreateWindowStruct(SDL_Window *parent, SDL_Tool
 #ifdef SDL_USE_LIBDBUS
     SDL_SystemTheme theme;
 #endif
-    #define ErrorFreeRetNull(x, y) SDL_SetError(x); SDL_free(y); return NULL;
-    #define ErrorCloseFreeRetNull(x, y, z) X11_XCloseDisplay(z->display); SDL_SetError(x, y); SDL_free(z); return NULL;
+    #define ErrorFreeRetNull(x, y) SDL_SetError(x); SDL_free(y); return NULL
+    #define ErrorCloseFreeRetNull(x, y, z) X11_XCloseDisplay(z->display); SDL_SetError(x, y); SDL_free(z); return NULL
 
     if (!SDL_X11_LoadSymbols()) {
         return NULL;

+ 7 - 7
src/video/yuv2rgb/yuv_rgb_std_func.h

@@ -14,7 +14,7 @@
 		((((Uint16)clampU8(y_tmp+r_tmp)) << 8 ) & 0xF800) | \
 		((((Uint16)clampU8(y_tmp+g_tmp)) << 3) & 0x07E0) | \
 		(((Uint16)clampU8(y_tmp+b_tmp)) >> 3); \
-	rgb_ptr += 2; \
+	rgb_ptr += 2
 
 #elif RGB_FORMAT == RGB_FORMAT_RGB24
 
@@ -22,7 +22,7 @@
 	rgb_ptr[0] = clampU8(y_tmp+r_tmp); \
 	rgb_ptr[1] = clampU8(y_tmp+g_tmp); \
 	rgb_ptr[2] = clampU8(y_tmp+b_tmp); \
-	rgb_ptr += 3; \
+	rgb_ptr += 3
 
 #elif RGB_FORMAT == RGB_FORMAT_RGBA
 
@@ -32,7 +32,7 @@
 		(((Uint32)clampU8(y_tmp+g_tmp)) << 16) | \
 		(((Uint32)clampU8(y_tmp+b_tmp)) << 8) | \
 		0x000000FF; \
-	rgb_ptr += 4; \
+	rgb_ptr += 4
 
 #elif RGB_FORMAT == RGB_FORMAT_BGRA
 
@@ -42,7 +42,7 @@
 		(((Uint32)clampU8(y_tmp+g_tmp)) << 16) | \
 		(((Uint32)clampU8(y_tmp+r_tmp)) << 8) | \
 		0x000000FF; \
-	rgb_ptr += 4; \
+	rgb_ptr += 4
 
 #elif RGB_FORMAT == RGB_FORMAT_ARGB
 
@@ -52,7 +52,7 @@
 		(((Uint32)clampU8(y_tmp+r_tmp)) << 16) | \
 		(((Uint32)clampU8(y_tmp+g_tmp)) << 8) | \
 		(((Uint32)clampU8(y_tmp+b_tmp)) << 0); \
-	rgb_ptr += 4; \
+	rgb_ptr += 4
 
 #elif RGB_FORMAT == RGB_FORMAT_ABGR
 
@@ -62,7 +62,7 @@
 		(((Uint32)clampU8(y_tmp+b_tmp)) << 16) | \
 		(((Uint32)clampU8(y_tmp+g_tmp)) << 8) | \
 		(((Uint32)clampU8(y_tmp+r_tmp)) << 0); \
-	rgb_ptr += 4; \
+	rgb_ptr += 4
 
 #elif RGB_FORMAT == RGB_FORMAT_XBGR2101010
 
@@ -72,7 +72,7 @@
 		(((Uint32)clamp10(y_tmp+b_tmp)) << 20) | \
 		(((Uint32)clamp10(y_tmp+g_tmp)) << 10) | \
 		(((Uint32)clamp10(y_tmp+r_tmp)) << 0); \
-	rgb_ptr += 4; \
+	rgb_ptr += 4
 
 #else
 #error PACK_PIXEL unimplemented