[vlc-commits] [Git][videolan/vlc][master] 2 commits: modules: add missing void parameters to functions

Steve Lhomme (@robUx4) gitlab at videolan.org
Mon Jan 8 07:36:47 UTC 2024



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
4aa0c2f3 by Johannes Kauffmann at 2024-01-08T07:06:53+00:00
modules: add missing void parameters to functions

Caught by -Wstrict-prototypes.

- - - - -
6fff5950 by Johannes Kauffmann at 2024-01-08T07:06:53+00:00
tests: add missing void parameters to functions

Caught by -Wstrict-prototypes.

- - - - -


21 changed files:

- modules/access/dvb/scan_list.c
- modules/codec/arib/aribsub.c
- modules/codec/omxil/omxil_core.c
- modules/codec/videotoolbox/dpb_test.c
- modules/demux/mpeg/ts_psip.c
- modules/keystore/secret.c
- modules/video_output/opengl/interop_gst_mem.c
- modules/video_output/opengl/interop_vaapi.c
- src/test/diffutil.c
- src/test/md5.c
- src/test/thread.c
- src/test/vector.c
- test/modules/codec/hxxx_helper.c
- test/modules/demux/ts_pes.c
- test/modules/lua/extension.c
- test/modules/misc/medialibrary.c
- test/modules/packetizer/hxxx.c
- test/modules/stream_out/pcr_sync.c
- test/src/config/chain.c
- test/src/input/thumbnail.c
- test/src/misc/image.c


Changes:

=====================================
modules/access/dvb/scan_list.c
=====================================
@@ -27,7 +27,7 @@
 #include "scan.h"
 #include "scan_list.h"
 
-static scan_list_entry_t * scan_list_entry_New()
+static scan_list_entry_t * scan_list_entry_New( void )
 {
     scan_list_entry_t *p_entry = calloc(1, sizeof(scan_list_entry_t));
     if( likely(p_entry) )


=====================================
modules/codec/arib/aribsub.c
=====================================
@@ -193,7 +193,7 @@ static void messages_callback_handler( void *p_opaque, const char *psz_message )
     msg_Dbg( p_dec, "%s", psz_message );
 }
 
-static char* get_arib_base_dir()
+static char* get_arib_base_dir( void )
 {
     char *psz_data_dir = config_GetUserDir( VLC_USERDATA_DIR );
     if( psz_data_dir == NULL )


=====================================
modules/codec/omxil/omxil_core.c
=====================================
@@ -84,7 +84,7 @@ static void *extra_dll_handle;
 static void (*pf_host_init)(void);
 static void (*pf_host_deinit)(void);
 
-static void CloseExtraDll()
+static void CloseExtraDll(void)
 {
     if (pf_host_deinit)
         pf_host_deinit();


=====================================
modules/codec/videotoolbox/dpb_test.c
=====================================
@@ -122,7 +122,7 @@ static void CheckOutput(struct dpb_s *dpb, date_t *ptsdate, frame_info_t *info,
     InsertIntoDPB(dpb, info);
 }
 
-static void CheckDPBWithFramesTest()
+static void CheckDPBWithFramesTest(void)
 {
     struct dpb_s dpb = {0};
     dpb.b_strict_reorder = true;
@@ -298,7 +298,7 @@ static void CheckDPBWithFramesTest()
     assert(dpb.i_size == 0);
 }
 
-static void CheckDPBWithFieldsTest()
+static void CheckDPBWithFieldsTest(void)
 {
     struct dpb_s dpb = {0};
     dpb.b_strict_reorder = true;


=====================================
modules/demux/mpeg/ts_psip.c
=====================================
@@ -91,7 +91,7 @@ void ts_psip_Packet_Push( ts_pid_t *p_pid, const uint8_t *p_pktbuffer )
         dvbpsi_packet_push( p_pid->u.p_psip->handle, (uint8_t *) p_pktbuffer );
 }
 
-ts_psip_context_t * ts_psip_context_New()
+ts_psip_context_t * ts_psip_context_New( void )
 {
     ts_psip_context_t *p_ctx = malloc(sizeof(*p_ctx));
     if(likely(p_ctx))


=====================================
modules/keystore/secret.c
=====================================
@@ -73,7 +73,7 @@ static void cancellable_interrupted(void *p_data)
     g_cancellable_cancel(p_canc);
 }
 
-static GCancellable *cancellable_register()
+static GCancellable *cancellable_register(void)
 {
     GCancellable *p_canc = g_cancellable_new();
     if (!p_canc)


=====================================
modules/video_output/opengl/interop_gst_mem.c
=====================================
@@ -54,7 +54,7 @@ struct priv
     struct
     {
         EGLDisplay display;
-        EGLDisplay (*getCurrentDisplay)();
+        EGLDisplay (*getCurrentDisplay)(void);
         const char *(*queryString)(EGLDisplay, EGLint);
         EGLImage (*createImageKHR)(EGLDisplay, EGLContext, EGLenum target, EGLClientBuffer buffer,
                 const EGLint *attrib_list);


=====================================
modules/video_output/opengl/interop_vaapi.c
=====================================
@@ -64,7 +64,7 @@ struct priv
     struct
     {
         EGLDisplay display;
-        EGLDisplay (*getCurrentDisplay)();
+        EGLDisplay (*getCurrentDisplay)(void);
         const char *(*queryString)(EGLDisplay, EGLint);
         EGLImage (*createImageKHR)(EGLDisplay, EGLContext, EGLenum target, EGLClientBuffer buffer,
                 const EGLint *attrib_list);


=====================================
src/test/diffutil.c
=====================================
@@ -194,7 +194,7 @@ static void check_changelist(const char* oldInput, const char* newInput, int fla
     CHECK_CHANGELIST(from, to, VLC_DIFFUTIL_RESULT_MOVE | VLC_DIFFUTIL_RESULT_AGGREGATE, __VA_ARGS__)
 
 
-int main()
+int main(void)
 {
     check_snake("", "", "");
     check_snake("unchanged", "unchanged", "=u=n=c=h=a=n=g=e=d");


=====================================
src/test/md5.c
=====================================
@@ -52,7 +52,7 @@ static const md5_sample_t md5_samples[] =
     { NULL,         NULL            }
 };
 
-static void test_vlc_hash_md5()
+static void test_vlc_hash_md5( void )
 {
     for( int i = 0; md5_samples[i].psz_string; i++ )
     {


=====================================
src/test/thread.c
=====================================
@@ -91,7 +91,7 @@ static void *thread_func_noop(void *data)
     return &thread_return_magic;
 }
 
-static void test__thread_create()
+static void test__thread_create(void)
 {
     vlc_thread_t th;
     TEST_THREAD_CLONE_MAGIC(&th, thread_func_noop);
@@ -111,7 +111,7 @@ static void *thread_func_loop(void *data)
     return &thread_return_magic;
 }
 
-static void test__thread_cancelation()
+static void test__thread_cancelation(void)
 {
     vlc_thread_t th;
     TEST_THREAD_CLONE_MAGIC(&th, thread_func_loop);
@@ -143,7 +143,7 @@ static void *thread_func_loop_cleanup(void *data)
     return &thread_return_magic;
 }
 
-static void test__thread_cancelation_with_cleanup()
+static void test__thread_cancelation_with_cleanup(void)
 {
     vlc_thread_t th;
     int th_cleanup_state = 0;
@@ -177,7 +177,7 @@ static void *thread_func_cond(void *ptr)
     return &thread_return_magic;
 }
 
-static void test__cond_broadcast()
+static void test__cond_broadcast(void)
 {
     struct cond_data data;
     vlc_thread_t threads[20];
@@ -208,7 +208,7 @@ static void test__cond_broadcast()
     }
 }
 
-static void test__cond_wait()
+static void test__cond_wait(void)
 {
     struct cond_data data;
     cond_data_init(&data, 1);
@@ -263,7 +263,7 @@ static void *thread_func_cond_timeout(void *ptr)
     return &thread_return_magic;
 }
 
-static void test__cond_wait_timeout()
+static void test__cond_wait_timeout(void)
 {
     struct cond_data data;
     cond_data_init(&data, 1);
@@ -334,7 +334,7 @@ static void *thread_func_tick_sleep(void *data)
     return &thread_return_magic;
 }
 
-static void test__vlc_tick_sleep_cancelation()
+static void test__vlc_tick_sleep_cancelation(void)
 {
     vlc_thread_t th;
     TEST_THREAD_CLONE_MAGIC(&th, thread_func_tick_sleep);
@@ -345,7 +345,7 @@ static void test__vlc_tick_sleep_cancelation()
 /*
  * Test sleeping for delay with vlc_tick_sleep
  */
-static void test__vlc_tick_sleep()
+static void test__vlc_tick_sleep(void)
 {
     vlc_tick_t now = vlc_tick_now();
 


=====================================
src/test/vector.c
=====================================
@@ -269,7 +269,7 @@ static void test_vector_foreach(void)
     vlc_vector_destroy(&vec);
 }
 
-static void test_vector_grow()
+static void test_vector_grow(void)
 {
     struct VLC_VECTOR(int) vec = VLC_VECTOR_INITIALIZER;
 


=====================================
test/modules/codec/hxxx_helper.c
=====================================
@@ -235,7 +235,7 @@ static int test_any(struct hxxx_helper *hlpr,
         if(ret) return ret;\
     } while(0)
 
-static int test_annexb()
+static int test_annexb(void)
 {
     int ret;
     fprintf(stderr,"H264\n");


=====================================
test/modules/demux/ts_pes.c
=====================================
@@ -71,7 +71,7 @@ static void Parse(vlc_object_t *obj, void *priv, block_t *data,
 
 #define PKT_FROM(a) PKT_FROMSZ(a, 0)
 
-int main()
+int main(void)
 {
     block_t *pkt;
     block_t *output = NULL;


=====================================
test/modules/lua/extension.c
=====================================
@@ -131,7 +131,7 @@ VLC_EXPORT const vlc_plugin_cb vlc_static_modules[] = {
 };
 
 
-int main()
+int main(void)
 {
     test_init();
 


=====================================
test/modules/misc/medialibrary.c
=====================================
@@ -104,7 +104,7 @@ static int cleanup_tmpdir(const char *dirpath, const struct stat *sb,
     return remove(dirpath);
 }
 
-int main()
+int main(void)
 {
     char template[] = "/tmp/vlc.test." MODULE_STRING ".XXXXXX";
     const char *tempdir = mkdtemp(template);


=====================================
test/modules/packetizer/hxxx.c
=====================================
@@ -131,7 +131,7 @@ static void testannexbin( const uint8_t *p_data, size_t i_data,
     testfunction( test##number##_annexbdata, sizeof(test##number##_annexbdata), \
                   p_res, rgi_res )
 
-static void test_annexb()
+static void test_annexb( void )
 {
     const uint8_t *p_res[3];
     size_t rgi_res[3];


=====================================
test/modules/stream_out/pcr_sync.c
=====================================
@@ -495,7 +495,7 @@ static void test_PCRHelperIOMismatch(vlc_pcr_sync_t *sync,
     assert(pcr == VLC_TICK_INVALID);
 }
 
-int main()
+int main(void)
 {
     test_Run(test_Simple);
     test_Run(test_MultipleTracks);


=====================================
test/src/config/chain.c
=====================================
@@ -48,7 +48,7 @@ static const escape_sample_t escape_samples[] =
     { NULL,         NULL            }
 };
 
-static void test_config_StringEscape()
+static void test_config_StringEscape( void )
 {
     for( int i = 0; escape_samples[i].psz_string; i++ )
     {
@@ -58,7 +58,7 @@ static void test_config_StringEscape()
     }
 }
 
-static void test_config_StringUnEscape()
+static void test_config_StringUnEscape( void )
 {
     for( int i = 0; escape_samples[i].psz_string; i++ )
     {
@@ -110,7 +110,7 @@ static const chain_sample_t chain_samples[] =
     { NULL,                              NULL,      NULL, { { NULL, NULL } } }
 };
 
-static void test_config_ChainCreate()
+static void test_config_ChainCreate( void )
 {
     for( int i = 0; chain_samples[i].psz_string; i++ )
     {
@@ -159,7 +159,7 @@ static void check_config_equality( config_chain_t *p_cfg1, config_chain_t *p_cfg
     assert(!p_cfg1 && !p_cfg2);
 }
 
-static void test_config_ChainDuplicate()
+static void test_config_ChainDuplicate( void )
 {
     for( int i = 0; ppsz_string[i]; i++ )
     {


=====================================
test/src/input/thumbnail.c
=====================================
@@ -199,7 +199,7 @@ static void test_cancel_thumbnail( libvlc_instance_t* p_vlc )
     vlc_thumbnailer_Release( p_thumbnailer );
 }
 
-int main()
+int main( void )
 {
     test_init();
 


=====================================
test/src/misc/image.c
=====================================
@@ -143,7 +143,7 @@ VLC_EXPORT const vlc_plugin_cb vlc_static_modules[] = {
 };
 
 
-int main()
+int main(void)
 {
     test_init();
 



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/ad377d480f78e8637f61b226435eedf4437dee3e...6fff59508e4217c2bb7272b5a33c95e215dde9d9

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/ad377d480f78e8637f61b226435eedf4437dee3e...6fff59508e4217c2bb7272b5a33c95e215dde9d9
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