Bug 70697 - reserved identifier violation
Summary: reserved identifier violation
Status: RESOLVED WONTFIX
Alias: None
Product: libqmi
Classification: Unclassified
Component: libqmi (show other bugs)
Version: unspecified
Hardware: All All
: medium normal
Assignee: Dan Williams
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-20 19:56 UTC by Markus Elfring
Modified: 2015-01-25 18:03 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Patch. (60.22 KB, patch)
2015-01-25 18:02 UTC, Aleksander Morgado
Details | Splinter Review

Description Markus Elfring 2013-10-20 19:56:56 UTC
I would like to point out that identifiers like "__LIBQMI_GLIB_H_INSIDE__" and "_LIBQMI_GLIB_QMI_MESSAGE_H_" do not fit to the expected naming convention of the C language standard.
http://cgit.freedesktop.org/libqmi/tree/src/libqmi-glib/libqmi-glib.h?id=852783f222a0db3666ef4ab24879ec20ff87c128#n27
http://cgit.freedesktop.org/libqmi/tree/src/libqmi-glib/qmi-message.h?id=c431f1796bc066dc105313d85c197abefa3a7f77#n30

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 Aleksander Morgado 2015-01-25 18:02:27 UTC
Created attachment 112808 [details] [review]
Patch.

Developed the changes required in the attached patch, but I don't think I'm going to go for it. Keeping the patch for future reference.

I don't think that this is very important truth be told, given that the possible name clash with a reserved identifier is virtually impossible (we anyway add a libqmi-specific prefix after the underscores).

Plus, the patch cannot cover every possible underscore prefix usage without breaking API (e.g. the GObject struct type definitions start with an underscore), so I'm going to close this one as wontfix (for now). If we ever do a full API cleanup, I'll recover the changes.
Comment 2 Aleksander Morgado 2015-01-25 18:03:35 UTC
The patch applies on top of 89c7b0fc54aa, btw.

Anyway, wontfix.


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.