Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 884503 Details for
Bug 731024
media-libs/libdc1394-2.2.6 fails to compile: control.c:286:19: error: fields must have a constant size: 'variable length array in structure' extension will never be supported
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PATCH] Clang fix v2
libdc1394-2.2.6-clang-fix.patch.txt (text/plain), 2.40 KB, created by
Maru
on 2024-02-07 23:18:00 UTC
(
hide
)
Description:
[PATCH] Clang fix v2
Filename:
MIME Type:
Creator:
Maru
Created:
2024-02-07 23:18:00 UTC
Size:
2.40 KB
patch
obsolete
>--- a/dc1394/juju/capture.c >+++ b/dc1394/juju/capture.c >@@ -321,7 +321,7 @@ dc1394_juju_capture_dequeue (platform_camera_t * craw, > > struct { > struct fw_cdev_event_iso_interrupt i; >- __u32 headers[craw->packets_per_frame*2 + 16]; // HPK 20161209 >+ __u32 *headers; > } iso; > > if ( (policy<DC1394_CAPTURE_POLICY_MIN) || (policy>DC1394_CAPTURE_POLICY_MAX) ) >@@ -333,20 +333,25 @@ dc1394_juju_capture_dequeue (platform_camera_t * craw, > fds[0].fd = craw->iso_fd; > fds[0].events = POLLIN; > >+ iso.headers = malloc(craw->packets_per_frame*2 + 16); // HPK 20161209 >+ > while (1) { > err = poll(fds, 1, (policy == DC1394_CAPTURE_POLICY_POLL) ? 0 : -1); > if (err < 0) { > if (errno == EINTR) > continue; > dc1394_log_error("poll() failed for device %s.", craw->filename); >+ free(iso.headers); > return DC1394_FAILURE; > } else if (err == 0) { >+ free(iso.headers); > return DC1394_SUCCESS; > } > > len = read (craw->iso_fd, &iso, sizeof iso); > if (len < 0) { > dc1394_log_error("Juju: dequeue failed to read a response: %m"); >+ free(iso.headers); > return DC1394_FAILURE; > } > >@@ -394,6 +399,8 @@ dc1394_juju_capture_dequeue (platform_camera_t * craw, > > *frame_return = &f->frame; > >+ free(iso.headers); >+ > return DC1394_SUCCESS; > } > >diff --git a/dc1394/juju/control.c b/dc1394/juju/control.c >index c730d3c..abcd544 100644 >--- a/dc1394/juju/control.c >+++ b/dc1394/juju/control.c >@@ -283,7 +283,7 @@ juju_handle_event (platform_camera_t * cam) > union { > struct { > struct fw_cdev_event_response r; >- __u32 buffer[cam->max_response_quads]; >+ __u32 *buffer; > } response; > struct fw_cdev_event_bus_reset reset; > struct fw_cdev_event_iso_resource resource; >@@ -292,6 +292,8 @@ juju_handle_event (platform_camera_t * cam) > juju_response_info *resp_info; > juju_iso_info *iso_info; > >+ u.response.buffer = malloc(cam->max_response_quads); >+ > len = read (cam->fd, &u, sizeof u); > if (len < 0) { > dc1394_log_error("juju: Read failed: %m"); >@@ -371,6 +373,8 @@ juju_handle_event (platform_camera_t * cam) > break; > } > >+ free(u.response.buffer); >+ > return 0; > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 731024
:
647890
|
647892
|
862369
| 884503