Bug 70679

Summary: reserved identifier violation
Product: Wayland Reporter: Markus Elfring <Markus.Elfring>
Component: waylandAssignee: Wayland bug list <wayland-bugs>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: 1.3.0   
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Markus Elfring 2013-10-20 16:33:20 UTC
I would like to point out that identifiers like "_WAYLAND_CLIENT_H" and "_XcursorImage" do not fit to the expected naming convention of the C language standard.
http://cgit.freedesktop.org/wayland/wayland/tree/src/wayland-client.h?id=eb947e9408c149041c4c8e1c80ef9ebea049f477#n23
http://cgit.freedesktop.org/wayland/wayland/tree/cursor/xcursor.h?id=c66f26024b8ddc7b4b00b81e37945ad86b1a1fd8#n32

Would you like to adjust your selection for unique names?
https://www.securecoding.cert.org/confluence/display/seccode/DCL37-C.+Do+not+declare+or+define+a+reserved+identifier
Comment 1 Kristian Høgsberg 2013-10-21 21:36:29 UTC
I've updated the #include guards in our installed headers to be consistent and conformant.  I've left the _XcursorImage struct tag since we inherit that from the Xcursor code.

Thanks.
Comment 2 Markus Elfring 2013-10-22 08:00:23 UTC
(In reply to comment #1)

Thanks for your source code improvement.


> I've left the _XcursorImage struct tag since we inherit that from
> the Xcursor code.

How do you think about to avoid at all places that this software builds on undefined behaviour?
Comment 3 Kristian Høgsberg 2013-10-22 21:06:13 UTC
(In reply to comment #2)
> (In reply to comment #1)
> 
> Thanks for your source code improvement.
> 
> 
> > I've left the _XcursorImage struct tag since we inherit that from
> > the Xcursor code.
> 
> How do you think about to avoid at all places that this software builds on
> undefined behaviour?

If you have a real issue with this, please reopen.  We're done with this one for now, thanks.
Comment 4 Markus Elfring 2013-10-23 08:40:17 UTC
(In reply to comment #3)

I guess that it would be easy to delete the leading underscore also from such identifiers to make your software a bit more standard-compliant.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.