diff --git a/include/SDL3/SDL_dlopennote.h b/include/SDL3/SDL_dlopennote.h index 5190a80095..e866d2a203 100644 --- a/include/SDL3/SDL_dlopennote.h +++ b/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 diff --git a/src/audio/aaudio/SDL_aaudio.c b/src/audio/aaudio/SDL_aaudio.c index 41c50cd630..0f84b209ee 100644 --- a/src/audio/aaudio/SDL_aaudio.c +++ b/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 { diff --git a/src/audio/alsa/SDL_alsa_audio.c b/src/audio/alsa/SDL_alsa_audio.c index 01a89a9ec2..3063e01b03 100644 --- a/src/audio/alsa/SDL_alsa_audio.c +++ b/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) { diff --git a/src/audio/jack/SDL_jackaudio.c b/src/audio/jack/SDL_jackaudio.c index 49dff5fc91..94f7e9dfe2 100644 --- a/src/audio/jack/SDL_jackaudio.c +++ b/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; diff --git a/src/audio/pipewire/SDL_pipewire.c b/src/audio/pipewire/SDL_pipewire.c index eb3432ac7b..2b6dc795d6 100644 --- a/src/audio/pipewire/SDL_pipewire.c +++ b/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; diff --git a/src/audio/pulseaudio/SDL_pulseaudio.c b/src/audio/pulseaudio/SDL_pulseaudio.c index c81fd00f33..92ccc78f80 100644 --- a/src/audio/pulseaudio/SDL_pulseaudio.c +++ b/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; diff --git a/src/audio/sndio/SDL_sndioaudio.c b/src/audio/sndio/SDL_sndioaudio.c index 1cc7ac7551..f36277a0f6 100644 --- a/src/audio/sndio/SDL_sndioaudio.c +++ b/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) { diff --git a/src/camera/pipewire/SDL_camera_pipewire.c b/src/camera/pipewire/SDL_camera_pipewire.c index b2aae04a5b..c3530f8672 100644 --- a/src/camera/pipewire/SDL_camera_pipewire.c +++ b/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; diff --git a/src/core/linux/SDL_dbus.c b/src/core/linux/SDL_dbus.c index b675f18724..4ca9a50692 100644 --- a/src/core/linux/SDL_dbus.c +++ b/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) { diff --git a/src/core/linux/SDL_udev.c b/src/core/linux/SDL_udev.c index 0647c9275c..4ba5123ac9 100644 --- a/src/core/linux/SDL_udev.c +++ b/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; diff --git a/src/core/unix/SDL_fribidi.c b/src/core/unix/SDL_fribidi.c index 44e31d1a94..5e04860f61 100644 --- a/src/core/unix/SDL_fribidi.c +++ b/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) diff --git a/src/core/unix/SDL_libthai.c b/src/core/unix/SDL_libthai.c index 022db50409..4298d679de 100644 --- a/src/core/unix/SDL_libthai.c +++ b/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 diff --git a/src/hidapi/SDL_hidapi.c b/src/hidapi/SDL_hidapi.c index 13bfc4ed5e..276a33f859 100644 --- a/src/hidapi/SDL_hidapi.c +++ b/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) diff --git a/src/io/io_uring/SDL_asyncio_liburing.c b/src/io/io_uring/SDL_asyncio_liburing.c index 6500893e56..982fc3c13d 100644 --- a/src/io/io_uring/SDL_asyncio_liburing.c +++ b/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)) \ diff --git a/src/misc/SDL_libusb.c b/src/misc/SDL_libusb.c index 0b7da1f3e5..81e7a16d65 100644 --- a/src/misc/SDL_libusb.c +++ b/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; diff --git a/src/storage/steam/SDL_steamstorage.c b/src/storage/steam/SDL_steamstorage.c index 570cf6e855..592aa4dd31 100644 --- a/src/storage/steam/SDL_steamstorage.c +++ b/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 diff --git a/src/video/SDL_egl.c b/src/video/SDL_egl.c index 85fb2374c3..752e61610e 100644 --- a/src/video/SDL_egl.c +++ b/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) diff --git a/src/video/kmsdrm/SDL_kmsdrmdyn.c b/src/video/kmsdrm/SDL_kmsdrmdyn.c index af8ffb6324..94726fe656 100644 --- a/src/video/kmsdrm/SDL_kmsdrmdyn.c +++ b/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 { diff --git a/src/video/kmsdrm/SDL_kmsdrmvulkan.c b/src/video/kmsdrm/SDL_kmsdrmvulkan.c index 1f374c6649..dc31fb91a7 100644 --- a/src/video/kmsdrm/SDL_kmsdrmvulkan.c +++ b/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) { diff --git a/src/video/offscreen/SDL_offscreenvulkan.c b/src/video/offscreen/SDL_offscreenvulkan.c index ac1a84f102..f7e69f6f62 100644 --- a/src/video/offscreen/SDL_offscreenvulkan.c +++ b/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 diff --git a/src/video/openvr/SDL_openvrvideo.c b/src/video/openvr/SDL_openvrvideo.c index c492d4b7fd..0ea2331385 100644 --- a/src/video/openvr/SDL_openvrvideo.c +++ b/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" diff --git a/src/video/wayland/SDL_waylanddyn.c b/src/video/wayland/SDL_waylanddyn.c index e45a96fb53..499d182c1a 100644 --- a/src/video/wayland/SDL_waylanddyn.c +++ b/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 diff --git a/src/video/wayland/SDL_waylandvulkan.c b/src/video/wayland/SDL_waylandvulkan.c index cdf60be42e..ee615efed2 100644 --- a/src/video/wayland/SDL_waylandvulkan.c +++ b/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) { diff --git a/src/video/x11/SDL_x11dyn.c b/src/video/x11/SDL_x11dyn.c index efab3f72b4..a3beab44e2 100644 --- a/src/video/x11/SDL_x11dyn.c +++ b/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 diff --git a/src/video/x11/SDL_x11vulkan.c b/src/video/x11/SDL_x11vulkan.c index 1ecc6e2cd3..9842b47e1e 100644 --- a/src/video/x11/SDL_x11vulkan.c +++ b/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; diff --git a/test/testdlopennote.c b/test/testdlopennote.c index ec53c22505..5229534d5e 100644 --- a/test/testdlopennote.c +++ b/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);