Explorar el Código

Fix warnings: extra semi - spurious (#15014)

RaceTheMaSe hace 3 semanas
padre
commit
6f754e5c03

+ 1 - 1
src/dialog/SDL_dialog.c

@@ -60,7 +60,7 @@ void SDL_ShowFileDialogWithProperties(SDL_FileDialogType type, SDL_DialogFileCal
         SDL_SetError("Unsupported file dialog type: %d", (int) type);
         callback(userdata, NULL, -1);
         break;
-    };
+    }
 #endif
 }
 

+ 1 - 1
src/dialog/android/SDL_androiddialog.c

@@ -49,7 +49,7 @@ void SDL_SYS_ShowFileDialogWithProperties(SDL_FileDialogType type, SDL_DialogFil
         SDL_Unsupported();
         callback(userdata, NULL, -1);
         return;
-    };
+    }
 
     if (!Android_JNI_OpenFileDialog(callback, userdata, filters, nfilters, is_save, allow_many)) {
         // SDL_SetError is already called when it fails

+ 2 - 2
src/dialog/unix/SDL_zenitydialog.c

@@ -74,7 +74,7 @@ static bool get_x11_window_handle(SDL_PropertiesID props, char *out)
     }
     if (SDL_snprintf(out, X11_HANDLE_MAX_WIDTH, "0x%" SDL_PRIx64, handle) >= X11_HANDLE_MAX_WIDTH) {
         return false;
-    };
+    }
     return true;
 }
 
@@ -156,7 +156,7 @@ static zenityArgs *create_zenity_args(SDL_FileDialogType type, SDL_DialogFileCal
     case SDL_FILEDIALOG_OPENFOLDER:
         argv[argc++] = "--directory";
         break;
-    };
+    }
 
     if (args->filename) {
         argv[argc++] = "--filename";

+ 1 - 1
src/dialog/windows/SDL_windowsdialog.c

@@ -1287,5 +1287,5 @@ void SDL_SYS_ShowFileDialogWithProperties(SDL_FileDialogType type, SDL_DialogFil
     case SDL_FILEDIALOG_OPENFOLDER:
         ShowFolderDialog(callback, userdata, window, default_location, allow_many, title, accept, cancel);
         break;
-    };
+    }
 }

+ 2 - 2
src/filesystem/windows/SDL_sysfilesystem.c

@@ -234,7 +234,7 @@ char *SDL_SYS_GetUserFolder(SDL_Folder folder)
         default:
             SDL_SetError("Invalid SDL_Folder: %d", (int)folder);
             goto done;
-        };
+        }
 
         hr = pSHGetKnownFolderPath(&type, 0x00008000 /* KF_FLAG_CREATE */, NULL, &path);
         if (SUCCEEDED(hr)) {
@@ -296,7 +296,7 @@ char *SDL_SYS_GetUserFolder(SDL_Folder folder)
         default:
             SDL_SetError("Unsupported SDL_Folder on Windows before Vista: %d", (int)folder);
             goto done;
-        };
+        }
 
         // Create the OS-specific folder if it doesn't already exist
         type |= CSIDL_FLAG_CREATE;

+ 1 - 1
src/video/wayland/SDL_waylandevents.c

@@ -1066,7 +1066,7 @@ static void pointer_handle_button(void *data, struct wl_pointer *pointer, uint32
         Wayland_UpdateImplicitGrabSerial(seat, serial);
     }
 
-    seat->pointer.pending_frame.timestamp_ns = Wayland_GetPointerTimestamp(seat, time);;
+    seat->pointer.pending_frame.timestamp_ns = Wayland_GetPointerTimestamp(seat, time);
 
     if (wl_seat_get_version(seat->wl_seat) >= WL_POINTER_FRAME_SINCE_VERSION) {
         if (state_w) {

+ 1 - 1
src/video/x11/SDL_x11messagebox.c

@@ -94,7 +94,7 @@ static void X11_PositionMessageBox(SDL_MessageBoxX11 *controls, int *wp, int *hp
             controls->icon->rect.x = 0;
         } else {
             controls->message->rect.x = 0;    
-            controls->icon->rect.x = controls->message->rect.w + SDL_TOOLKIT_X11_ELEMENT_PADDING_2  * controls->window->iscale;;
+            controls->icon->rect.x = controls->message->rect.w + SDL_TOOLKIT_X11_ELEMENT_PADDING_2  * controls->window->iscale;
         }
         
         if (controls->message->rect.h > controls->icon->rect.h) {

+ 1 - 1
test/testautomation_surface.c

@@ -1655,7 +1655,7 @@ static int surface_testSetGetSurfaceClipRect(void *args)
     }
     SDL_DestroySurface(s);
     return TEST_COMPLETED;
-};
+}
 
 static int SDLCALL surface_testFlip(void *arg)
 {