[vlc-commits] [Git][videolan/vlc][master] config: share the prototype of platform_GetUserDir()

Steve Lhomme (@robUx4) gitlab at videolan.org
Fri Sep 1 12:00:59 UTC 2023



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
336f2614 by Steve Lhomme at 2023-09-01T11:38:24+00:00
config: share the prototype of platform_GetUserDir()

This will avoid a -Wmissing-prototype warning and ensures the signature is respected.

- - - - -


8 changed files:

- src/android/specific.c
- src/config/configuration.h
- src/config/dirs.c
- src/darwin/dirs.m
- src/os2/dirs.c
- src/posix/dirs.c
- src/win32/dirs-uap.c
- src/win32/dirs.c


Changes:

=====================================
src/android/specific.c
=====================================
@@ -29,7 +29,7 @@
 #include <vlc_network.h>
 #include <vlc_fs.h>
 #include "../libvlc.h"
-#include "config/configuration.h"
+#include "../config/configuration.h"
 
 #include <string.h>
 #include <jni.h>


=====================================
src/config/configuration.h
=====================================
@@ -82,4 +82,6 @@ char *config_GetLibDir(void) VLC_USED VLC_MALLOC;
 /* The configuration file */
 #define CONFIG_FILE                     "vlcrc"
 
+char *platform_GetUserDir( vlc_userdir_t ) VLC_USED VLC_MALLOC;
+
 #endif


=====================================
src/config/dirs.c
=====================================
@@ -26,15 +26,13 @@
 
 #include <vlc_common.h>
 #include <vlc_configuration.h>
+#include "configuration.h"
 
 static const char *userdir_to_env[] =
 {
     [VLC_USERDATA_DIR] = "VLC_USERDATA_PATH",
 };
 
-/* Platforms must implement this function */
-char *platform_GetUserDir( vlc_userdir_t ) VLC_USED VLC_MALLOC;
-
 char *config_GetUserDir (vlc_userdir_t type)
 {
     if (type >= 0 && type < ARRAY_SIZE(userdir_to_env) &&


=====================================
src/darwin/dirs.m
=====================================
@@ -31,6 +31,7 @@
 #include <vlc_configuration.h>
 #include <vlc_charset.h>
 #include "../libvlc.h"
+#include "../config/configuration.h"
 
 #include <libgen.h>
 #include <dlfcn.h>


=====================================
src/os2/dirs.c
=====================================
@@ -28,7 +28,7 @@
 
 #include "../libvlc.h"
 #include <vlc_charset.h>
-#include "config/configuration.h"
+#include "../config/configuration.h"
 
 #include <assert.h>
 


=====================================
src/posix/dirs.c
=====================================
@@ -28,7 +28,7 @@
 #include <vlc_common.h>
 
 #include "../libvlc.h"
-#include "config/configuration.h"
+#include "../config/configuration.h"
 
 #include <unistd.h>
 #include <pwd.h>


=====================================
src/win32/dirs-uap.c
=====================================
@@ -33,6 +33,7 @@
 #endif
 #include <vlc_common.h>
 #include <vlc_configuration.h>
+#include "../config/configuration.h"
 
 #include <vlc_charset.h>
 


=====================================
src/win32/dirs.c
=====================================
@@ -36,7 +36,7 @@
 #include "../libvlc.h"
 #include <vlc_charset.h>
 #include <vlc_configuration.h>
-#include "config/configuration.h"
+#include "../config/configuration.h"
 
 #include <assert.h>
 #include <limits.h>



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/336f26147bfd99f294c06cd1d5965b959d4d71a5

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/336f26147bfd99f294c06cd1d5965b959d4d71a5
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list