Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 571792 - [x11 overlay] xcb-util-cursor warning-as-error chokes on load_cursor.c
Summary: [x11 overlay] xcb-util-cursor warning-as-error chokes on load_cursor.c
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-13 22:18 UTC by Robert White
Modified: 2017-01-29 06:44 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Add braces/scope to legalize variable declaration. (t2,4.41 KB, patch)
2016-01-13 22:19 UTC, Robert White
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Robert White 2016-01-13 22:18:12 UTC
The below "declaration after statements" warning is easily fixed by adding a non-conditional block. Without the extra braces the declaration of the "elements" array is illegal. The declaration isn't subject to movement as the array size is determined dynamically.

Patch Attached.

Actual error message:

/var/tmp/portage/x11-libs/xcb-util-cursor-9999/work/xcb-util-cursor-9999/cursor/load_cursor.c: In function ‘xcb_cursor_load_cursor’:
/var/tmp/portage/x11-libs/xcb-util-cursor-9999/work/xcb-util-cursor-9999/cursor/load_cursor.c:226:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
     xcb_render_animcursorelt_t elements[nimg];
     ^
make[1]: Leaving directory '/var/tmp/portage/x11-libs/xcb-util-cursor-9999/work/xcb-util-cursor-9999-abi_x86_32.x86/cursor'


Reproducible: Always
Comment 1 Robert White 2016-01-13 22:19:13 UTC
Created attachment 422840 [details, diff]
Add braces/scope to legalize variable declaration.
Comment 2 Matt Turner gentoo-dev 2017-01-29 06:44:04 UTC
Please send upstream to the XCB mailing list: https://lists.freedesktop.org/mailman/listinfo/xcb