[vlc-commits] [Git][videolan/vlc][master] kms: fix build

Hugo Beauzée-Luyssen (@chouquette) gitlab at videolan.org
Wed Jan 12 09:00:58 UTC 2022



Hugo Beauzée-Luyssen pushed to branch master at VideoLAN / VLC


Commits:
b02753e5 by Thomas Guillem at 2022-01-12T07:53:34+00:00
kms: fix build

Fix the following build error:
```
../../modules/video_output/kms.c: In function ‘WindowEnable’:
../../modules/video_output/kms.c:335:9: error: a label can only be part of a statement and a declaration is not a statement
  335 |         struct drm_mode_destroy_dumb destroy_request = {
```

With gcc version 10.2.1 20210110 (Debian 10.2.1-6) and -fsanitize=thread

- - - - -


1 changed file:

- modules/video_output/kms.c


Changes:

=====================================
modules/video_output/kms.c
=====================================
@@ -332,13 +332,15 @@ error_set_crtc:
     drmModeRmFB(sys->drm_fd, new_fb);
 
 error_add_fb:
-    struct drm_mode_destroy_dumb destroy_request = {
-        .handle = request.handle
-    };
-    ret = drmIoctl(sys->drm_fd, DRM_IOCTL_MODE_DESTROY_DUMB, &destroy_request);
-    /* This must be a programmation error if we cannot destroy the resources
-     * we created. */
-    assert(ret == drvSuccess);
+    {
+        struct drm_mode_destroy_dumb destroy_request = {
+            .handle = request.handle
+        };
+        ret = drmIoctl(sys->drm_fd, DRM_IOCTL_MODE_DESTROY_DUMB, &destroy_request);
+        /* This must be a programmation error if we cannot destroy the resources
+         * we created. */
+        assert(ret == drvSuccess);
+    }
 
 error_create_dumb:
     if (sys->saved_crtc != NULL)



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

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




More information about the vlc-commits mailing list