Kaynağa Gözat

dlnote: embed trailing semicolon in SDL_ELF_NOTE_DLOPEN macro

Anonymous Maarten 2 ay önce
ebeveyn
işleme
9dd3e2305e

+ 6 - 4
include/SDL3/SDL_dlopennote.h

@@ -41,7 +41,7 @@
  *     "Support for video through SDL",
  *     SDL_ELF_NOTE_DLOPEN_PRIORITY_SUGGESTED,
  *     "libSDL-1.2.so.0", "libSDL-2.0.so.0", "libSDL3.so.0"
- *   );
+ *   )
  *   int main(int argc, char *argv[]) {
  *     return argc + argv[0][1];
  *   }
@@ -183,9 +183,11 @@
  *     "Support for loading PNG images using libpng (required for APNG)",
  *     SDL_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED,
  *     "libpng12.so.0"
- * );
+ * )
  * ```
  *
+ * A trailing semicolon is not needed.
+ *
  * Or if you support multiple versions of a library, you can list them:
  *
  * ```c
@@ -195,7 +197,7 @@
  *     "Create windows through SDL video backend",
  *     SDL_ELF_NOTE_DLOPEN_PRIORITY_REQUIRED
  *     "libSDL-1.2.so.0", "libSDL2-2.0.so.0", "libSDL3.so.0"
- * );
+ * )
  * ```
  *
  * This macro is not available for compilers that do not support variadic
@@ -213,7 +215,7 @@
         "\",\"description\":\"" description                      \
         "\",\"priority\":\"" priority                            \
         "\",\"soname\":" SDL_DLNOTE_JSON_ARRAY(__VA_ARGS__) "}]",   \
-        SDL_DLNOTE_UNIQUE_NAME)
+        SDL_DLNOTE_UNIQUE_NAME);
 
 #elif defined(__GNUC__) && __GNUC__ < 3
 

+ 1 - 1
src/audio/aaudio/SDL_aaudio.c

@@ -58,7 +58,7 @@ SDL_ELF_NOTE_DLOPEN(
     "Support for audio through AAudio",
     SDL_ELF_NOTE_DLOPEN_PRIORITY_SUGGESTED,
     LIB_AAUDIO_SO
-);
+)
 
 typedef struct AAUDIO_Data
 {

+ 1 - 1
src/audio/alsa/SDL_alsa_audio.c

@@ -214,7 +214,7 @@ SDL_ELF_NOTE_DLOPEN(
     "Support for audio through libalsa",
     SDL_ELF_NOTE_DLOPEN_PRIORITY_SUGGESTED,
     SDL_AUDIO_DRIVER_ALSA_DYNAMIC
-);
+)
 
 static void UnloadALSALibrary(void)
 {

+ 1 - 1
src/audio/jack/SDL_jackaudio.c

@@ -55,7 +55,7 @@ SDL_ELF_NOTE_DLOPEN(
     "Support for audio through libjack",
     SDL_ELF_NOTE_DLOPEN_PRIORITY_SUGGESTED,
     SDL_AUDIO_DRIVER_JACK_DYNAMIC
-);
+)
 
 static const char *jack_library = SDL_AUDIO_DRIVER_JACK_DYNAMIC;
 static SDL_SharedObject *jack_handle = NULL;

+ 1 - 1
src/audio/pipewire/SDL_pipewire.c

@@ -98,7 +98,7 @@ SDL_ELF_NOTE_DLOPEN(
     "Support for audio through libpipewire",
     SDL_ELF_NOTE_DLOPEN_PRIORITY_SUGGESTED,
     SDL_AUDIO_DRIVER_PIPEWIRE_DYNAMIC
-);
+)
 
 static const char *pipewire_library = SDL_AUDIO_DRIVER_PIPEWIRE_DYNAMIC;
 static SDL_SharedObject *pipewire_handle = NULL;

+ 1 - 1
src/audio/pulseaudio/SDL_pulseaudio.c

@@ -138,7 +138,7 @@ SDL_ELF_NOTE_DLOPEN(
     "Support for audio through libpulseaudio",
     SDL_ELF_NOTE_DLOPEN_PRIORITY_SUGGESTED,
     SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC
-);
+)
 
 static const char *pulseaudio_library = SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC;
 static SDL_SharedObject *pulseaudio_handle = NULL;

+ 1 - 1
src/audio/sndio/SDL_sndioaudio.c

@@ -113,7 +113,7 @@ SDL_ELF_NOTE_DLOPEN(
     "Support for audio through libsndio",
     SDL_ELF_NOTE_DLOPEN_PRIORITY_SUGGESTED,
     SDL_AUDIO_DRIVER_SNDIO_DYNAMIC
-);
+)
 
 static void UnloadSNDIOLibrary(void)
 {

+ 1 - 1
src/camera/pipewire/SDL_camera_pipewire.c

@@ -114,7 +114,7 @@ SDL_ELF_NOTE_DLOPEN(
     "Support for camera through libpipewire",
     SDL_ELF_NOTE_DLOPEN_PRIORITY_SUGGESTED,
     SDL_CAMERA_DRIVER_PIPEWIRE_DYNAMIC
-);
+)
 
 static const char *pipewire_library = SDL_CAMERA_DRIVER_PIPEWIRE_DYNAMIC;
 static SDL_SharedObject *pipewire_handle = NULL;

+ 1 - 1
src/core/linux/SDL_dbus.c

@@ -36,7 +36,7 @@ SDL_ELF_NOTE_DLOPEN(
     "Support for D-Bus IPC",
     SDL_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED,
     SDL_DRIVER_DBUS_DYNAMIC
-);
+)
 
 static bool LoadDBUSSyms(void)
 {

+ 1 - 1
src/core/linux/SDL_udev.c

@@ -51,7 +51,7 @@ SDL_ELF_NOTE_DLOPEN(
     "Support for events through libudev",
     SDL_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED,
     SDL_UDEV_DLNOTE_LIBS
-);
+)
 
 static SDL_UDEV_PrivateData *_this = NULL;
 

+ 1 - 1
src/core/unix/SDL_fribidi.c

@@ -30,7 +30,7 @@ SDL_ELF_NOTE_DLOPEN(
     "Bidirectional text support",
     SDL_ELF_NOTE_DLOPEN_PRIORITY_SUGGESTED,
     SDL_FRIBIDI_DYNAMIC
-);
+)
 #endif
 
 SDL_FriBidi *SDL_FriBidi_Create(void)

+ 1 - 1
src/core/unix/SDL_libthai.c

@@ -30,7 +30,7 @@ SDL_ELF_NOTE_DLOPEN(
     "Thai language support",
     SDL_ELF_NOTE_DLOPEN_PRIORITY_SUGGESTED,
     SDL_LIBTHAI_DYNAMIC
-);
+)
 #endif
 
 

+ 1 - 1
src/hidapi/SDL_hidapi.c

@@ -46,7 +46,7 @@ SDL_ELF_NOTE_DLOPEN(
     "Support for joysticks through libusb",
     SDL_ELF_NOTE_DLOPEN_PRIORITY_SUGGESTED,
     SDL_LIBUSB_DYNAMIC
-);
+)
 #endif
 
 #if defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_WINGDK)

+ 1 - 1
src/io/io_uring/SDL_asyncio_liburing.c

@@ -53,7 +53,7 @@ SDL_ELF_NOTE_DLOPEN(
     "Support for async IO through liburing",
     SDL_ELF_NOTE_DLOPEN_PRIORITY_SUGGESTED,
     SDL_DRIVER_LIBURING_DYNAMIC
-);
+)
 
 #define SDL_LIBURING_FUNCS \
     SDL_LIBURING_FUNC(int, io_uring_queue_init, (unsigned entries, struct io_uring *ring, unsigned flags)) \

+ 1 - 1
src/misc/SDL_libusb.c

@@ -30,7 +30,7 @@ SDL_ELF_NOTE_DLOPEN(
     "Support for joysticks through libusb",
     SDL_ELF_NOTE_DLOPEN_PRIORITY_SUGGESTED,
     SDL_LIBUSB_DYNAMIC
-);
+)
 #endif
 
 static SDL_AtomicInt SDL_libusb_refcount;

+ 1 - 1
src/storage/steam/SDL_steamstorage.c

@@ -38,7 +38,7 @@ SDL_ELF_NOTE_DLOPEN(
     "Support for Steam user storage",
     SDL_ELF_NOTE_DLOPEN_PRIORITY_SUGGESTED,
     SDL_DRIVER_STEAMAPI_DYNAMIC
-);
+)
 
 // !!! FIXME: Async API can use SteamRemoteStorage_ReadFileAsync
 // !!! FIXME: Async API can use SteamRemoteStorage_WriteFileAsync

+ 5 - 5
src/video/SDL_egl.c

@@ -116,31 +116,31 @@ SDL_ELF_NOTE_DLOPEN(
     "Support for OpenGL",
     SDL_ELF_NOTE_DLOPEN_PRIORITY_SUGGESTED,
     DEFAULT_OGL, ALT_OGL
-);
+)
 SDL_ELF_NOTE_DLOPEN(
     "egl-egl",
     "Support for EGL",
     SDL_ELF_NOTE_DLOPEN_PRIORITY_SUGGESTED,
     DEFAULT_EGL
-);
+)
 SDL_ELF_NOTE_DLOPEN(
     "egl-es2",
     "Support for EGL ES2",
     SDL_ELF_NOTE_DLOPEN_PRIORITY_SUGGESTED,
     DEFAULT_OGL_ES2
-);
+)
 SDL_ELF_NOTE_DLOPEN(
     "egl-es-pvr",
     "Support for EGL ES PVR",
     SDL_ELF_NOTE_DLOPEN_PRIORITY_SUGGESTED,
     DEFAULT_OGL_ES_PVR
-);
+)
 SDL_ELF_NOTE_DLOPEN(
     "egl-ogl-es",
     "Support for OpenGL ES",
     SDL_ELF_NOTE_DLOPEN_PRIORITY_SUGGESTED,
     DEFAULT_OGL_ES
-);
+)
 #endif // SDL_VIDEO_DRIVER_RPI
 
 #if defined(SDL_VIDEO_OPENGL) && !defined(SDL_VIDEO_VITA_PVR_OGL)

+ 1 - 1
src/video/kmsdrm/SDL_kmsdrmdyn.c

@@ -34,7 +34,7 @@ SDL_ELF_NOTE_DLOPEN(
     "Support for KMSDRM",
     SDL_ELF_NOTE_DLOPEN_PRIORITY_SUGGESTED,
     SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC
-);
+)
 
 typedef struct
 {

+ 1 - 1
src/video/kmsdrm/SDL_kmsdrmvulkan.c

@@ -47,7 +47,7 @@ SDL_ELF_NOTE_DLOPEN(
     "Support for Vulkan on KMSDRM",
     SDL_ELF_NOTE_DLOPEN_PRIORITY_SUGGESTED,
     DEFAULT_VULKAN
-);
+)
 
 bool KMSDRM_Vulkan_LoadLibrary(SDL_VideoDevice *_this, const char *path)
 {

+ 1 - 1
src/video/offscreen/SDL_offscreenvulkan.c

@@ -47,7 +47,7 @@ SDL_ELF_NOTE_DLOPEN(
     "Support for offscreen Vulkan",
     SDL_ELF_NOTE_DLOPEN_PRIORITY_SUGGESTED,
     "libvulkan.so.1"
-);
+)
 
 #if defined( SDL_PLATFORM_APPLE )
 #include <dlfcn.h>

+ 1 - 1
src/video/openvr/SDL_openvrvideo.c

@@ -64,7 +64,7 @@ SDL_ELF_NOTE_DLOPEN(
     "Support for OpenVR video",
     SDL_ELF_NOTE_DLOPEN_PRIORITY_SUGGESTED,
     SDL_OPENVR_DRIVER_DYNAMIC
-);
+)
 
 #define MARKER_ID 0
 #define MARKER_STR "vr-marker,frame_end,type,application"

+ 5 - 5
src/video/wayland/SDL_waylanddyn.c

@@ -33,14 +33,14 @@ SDL_ELF_NOTE_DLOPEN(
     "Support for Wayland video",
     SDL_ELF_NOTE_DLOPEN_PRIORITY_SUGGESTED,
     SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC
-);
+)
 #ifdef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_EGL
 SDL_ELF_NOTE_DLOPEN(
     "wayland",
     "Support for Wayland video",
     SDL_ELF_NOTE_DLOPEN_PRIORITY_SUGGESTED,
     SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_EGL
-);
+)
 #endif
 #ifdef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_CURSOR
 SDL_ELF_NOTE_DLOPEN(
@@ -48,7 +48,7 @@ SDL_ELF_NOTE_DLOPEN(
     "Support for Wayland video",
     SDL_ELF_NOTE_DLOPEN_PRIORITY_SUGGESTED,
     SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_CURSOR
-);
+)
 #endif
 #ifdef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_XKBCOMMON
 SDL_ELF_NOTE_DLOPEN(
@@ -56,7 +56,7 @@ SDL_ELF_NOTE_DLOPEN(
     "Support for Wayland video",
     SDL_ELF_NOTE_DLOPEN_PRIORITY_SUGGESTED,
     SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_XKBCOMMON
-);
+)
 #endif
 #ifdef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_LIBDECOR
 SDL_ELF_NOTE_DLOPEN(
@@ -64,7 +64,7 @@ SDL_ELF_NOTE_DLOPEN(
     "Support for Wayland video",
     SDL_ELF_NOTE_DLOPEN_PRIORITY_SUGGESTED,
     SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_LIBDECOR
-);
+)
 #endif
 
 typedef struct

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

@@ -46,7 +46,7 @@ SDL_ELF_NOTE_DLOPEN(
     "Support for Vulkan on wayland backend",
     SDL_ELF_NOTE_DLOPEN_PRIORITY_SUGGESTED,
     DEFAULT_VULKAN
-);
+)
 
 bool Wayland_Vulkan_LoadLibrary(SDL_VideoDevice *_this, const char *path)
 {

+ 8 - 8
src/video/x11/SDL_x11dyn.c

@@ -43,7 +43,7 @@ SDL_ELF_NOTE_DLOPEN(
     "Support for video through X11 backend",
     SDL_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED,
     SDL_VIDEO_DRIVER_X11_DYNAMIC
-);
+)
 
 #ifdef SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT
 SDL_ELF_NOTE_DLOPEN(
@@ -51,7 +51,7 @@ SDL_ELF_NOTE_DLOPEN(
     "Support for video through X11 backend",
     SDL_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED,
     SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT
-);
+)
 #else
 #define SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT NULL
 #endif
@@ -62,7 +62,7 @@ SDL_ELF_NOTE_DLOPEN(
     "Support for video through X11 backend",
     SDL_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED,
     SDL_VIDEO_DRIVER_X11_DYNAMIC_XCURSOR
-);
+)
 #else
 #define SDL_VIDEO_DRIVER_X11_DYNAMIC_XCURSOR NULL
 #endif
@@ -73,7 +73,7 @@ SDL_ELF_NOTE_DLOPEN(
     "Support for video through X11 backend",
     SDL_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED,
     SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2
-);
+)
 #else
 #define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2 NULL
 #endif
@@ -84,7 +84,7 @@ SDL_ELF_NOTE_DLOPEN(
     "Support for video through X11 backend",
     SDL_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED,
     SDL_VIDEO_DRIVER_X11_DYNAMIC_XFIXES
-);
+)
 #else
 #define SDL_VIDEO_DRIVER_X11_DYNAMIC_XFIXES NULL
 #endif
@@ -95,7 +95,7 @@ SDL_ELF_NOTE_DLOPEN(
     "Support for video through X11 backend",
     SDL_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED,
     SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR
-);
+)
 #else
 #define SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR NULL
 #endif
@@ -106,7 +106,7 @@ SDL_ELF_NOTE_DLOPEN(
     "Support for video through X11 backend",
     SDL_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED,
     SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS
-);
+)
 #else
 #define SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS NULL
 #endif
@@ -117,7 +117,7 @@ SDL_ELF_NOTE_DLOPEN(
     "Support for video through X11 backend",
     SDL_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED,
     SDL_VIDEO_DRIVER_X11_DYNAMIC_XTEST
-);
+)
 #else
 #define SDL_VIDEO_DRIVER_X11_DYNAMIC_XTEST NULL
 #endif

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

@@ -44,14 +44,14 @@ SDL_ELF_NOTE_DLOPEN(
     "Support for vulkan on X11",
     SDL_ELF_NOTE_DLOPEN_PRIORITY_SUGGESTED,
     DEFAULT_VULKAN
-);
+)
 
 SDL_ELF_NOTE_DLOPEN(
     "x11-vulkan",
     "Support for vulkan on X11",
     SDL_ELF_NOTE_DLOPEN_PRIORITY_SUGGESTED,
     DEFAULT_X11_XCB
-);
+)
 
 /*
 typedef uint32_t xcb_window_t;

+ 1 - 1
test/testdlopennote.c

@@ -14,7 +14,7 @@ SDL_ELF_NOTE_DLOPEN(
     "Support for loading PNG images using libpng",
     SDL_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED,
     PNG_SHARED_LIBRARY
-);
+)
 
 typedef int png_sig_cmp_fn(const unsigned char *sig, size_t start, size_t num_to_check);