[vlc-commits] [Git][videolan/vlc][master] modules: don't return an expression in void functions

Steve Lhomme (@robUx4) gitlab at videolan.org
Thu Jan 19 05:09:31 UTC 2023



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
17f4c6a3 by Steve Lhomme at 2023-01-19T04:49:52+00:00
modules: don't return an expression in void functions

It's not allowed in C11 (but OK in C++).

- - - - -


2 changed files:

- modules/access/http/h1conn_test.c
- modules/control/hotkeys.c


Changes:

=====================================
modules/access/http/h1conn_test.c
=====================================
@@ -69,7 +69,7 @@ static void conn_send_raw(const void *buf, size_t len)
 
 static void conn_send(const char *str)
 {
-    return conn_send_raw(str, strlen(str));
+    conn_send_raw(str, strlen(str));
 }
 
 static void conn_shutdown(bool duplex)


=====================================
modules/control/hotkeys.c
=====================================
@@ -77,7 +77,8 @@ INTF_ACTION_HANDLER()
     switch (action_id)
     {
         case ACTIONID_QUIT:
-            return libvlc_Quit(vlc_object_instance(intf));
+            libvlc_Quit(vlc_object_instance(intf));
+            return;
         case ACTIONID_INTF_TOGGLE_FSC:
         case ACTIONID_INTF_HIDE:
             varname = "intf-toggle-fscontrol";
@@ -1098,7 +1099,10 @@ handle_action(intf_thread_t *intf, vlc_action_id_t action_id)
             actions[action_idx].range.last >= action_id)
             break;
     if (actions[action_idx].type == NULL_ACTION)
-        return msg_Warn(intf, "no handler for action %d", action_id);
+    {
+        msg_Warn(intf, "no handler for action %d", action_id);
+        return;
+    }
     struct vlc_action const *action = actions + action_idx;
 
     vlc_playlist_t *playlist = intf->p_sys->playlist;



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/17f4c6a3e067b203183e39414ef0ce7f75e3dd21

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/17f4c6a3e067b203183e39414ef0ce7f75e3dd21
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