SDL: tray, unix: fix -Wformat warnings

From ec8a780ad47b397dc791bec2fa8bd307c9dbbc2c Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Sat, 28 Dec 2024 18:37:56 +0300
Subject: [PATCH] tray, unix: fix -Wformat warnings

src/tray/unix/SDL_tray.c: In function 'get_tmp_filename':
src/tray/unix/SDL_tray.c:345: warning: format '%ld' expects type 'long int', but argument 2 has type 'size_t'
src/tray/unix/SDL_tray.c: In function 'get_appindicator_id':
src/tray/unix/SDL_tray.c:361: warning: format '%ld' expects type 'long int', but argument 3 has type 'unsigned int'
---
 src/tray/unix/SDL_tray.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/tray/unix/SDL_tray.c b/src/tray/unix/SDL_tray.c
index 7a5ed34ee9b9e..e3d27d9619240 100644
--- a/src/tray/unix/SDL_tray.c
+++ b/src/tray/unix/SDL_tray.c
@@ -342,7 +342,7 @@ static bool get_tmp_filename(char *buffer, size_t size)
     static int count = 0;
 
     if (size < 64) {
-        return SDL_SetError("Can't create temporary file for icon: size %ld < 64", size);
+        return SDL_SetError("Can't create temporary file for icon: size %u < 64", (unsigned int)size);
     }
 
     int would_have_written = SDL_snprintf(buffer, size, "/tmp/sdl_appindicator_icon_%d_%d.bmp", getpid(), count++);
@@ -358,7 +358,7 @@ static const char *get_appindicator_id(void)
     int would_have_written = SDL_snprintf(buffer, sizeof(buffer), "sdl-appindicator-%d-%d", getpid(), count++);
 
     if (would_have_written <= 0 || would_have_written >= sizeof(buffer) - 1) {
-        SDL_SetError("Couldn't fit %d bytes in buffer of size %ld", would_have_written, sizeof(buffer));
+        SDL_SetError("Couldn't fit %d bytes in buffer of size %d", would_have_written, (int) sizeof(buffer));
         return NULL;
     }