! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
reserved identifier violation
Status:
RESOLVED: MOVED
Product:
Tumbler
Component:
General

Comments

Description Markus Elfring 2020-05-12 20:35:08 CEST
I would like to point out that identifiers like “_TumblerSchedulerRequest” and “__TUMBLER_MANAGER_H__” do not fit to the expected naming convention of the C language standard.
* https://gitlab.xfce.org/xfce/tumbler/-/blob/f5589df90ce5b88c94b921a0989e41b09e208286/tumblerd/tumbler-manager.h#L22
* https://gitlab.xfce.org/xfce/tumbler/-/blob/f5589df90ce5b88c94b921a0989e41b09e208286/tumblerd/tumbler-scheduler.h#L30

Would you like to adjust the selection for unique names?
Comment 1 Ali Abdallah editbugs 2020-05-17 19:41:47 CEST
Thanks for you report. 

I don't think it is worth changing anything, especially the _TumblerSchedulerRequest, which is a forward type declaration.
Comment 2 Markus Elfring 2020-05-18 08:32:29 CEST
(In reply to Ali Abdallah from comment #1)
How do you think about to avoid that software components for XFCE depend on undefined behaviour?
https://www.securecoding.cert.org/confluence/display/c/CC.+Undefined+Behavior#CC.UndefinedBehavior-ub_106
Comment 3 Ali Abdallah editbugs 2020-05-18 11:07:06 CEST
The naming convention that you are referring to is part of iso 9899:2011, that's basically c11. 

You can navigate the code, of not only tumbler, but also other projects like gtk and glib, to see that the above convention is not respected in most cases.
Comment 4 Markus Elfring 2020-05-18 14:34:35 CEST
(In reply to Ali Abdallah from comment #3)
> The naming convention that you are referring to is part of iso 9899:2011,
> that's basically c11. 

Earlier programming language versions contain also requirements according to the reserved name space.
https://en.cppreference.com/w/c/language/identifier#Reserved_identifiers


> You can navigate the code, of not only tumbler, but also other projects like
> gtk and glib, to see that the above convention is not respected in most cases.

I find that such questionable ignorance can make the software implementation less secure.
https://wiki.sei.cmu.edu/confluence/display/c/DCL37-C.+Do+not+declare+or+define+a+reserved+identifier
Comment 5 Git Bot editbugs 2020-05-25 23:20:38 CEST
-- GitLab Migration Automatic Message --

This bug has been migrated to xfce.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.xfce.org/xfce/tumbler/-/issues/24.

Please create an account or use an existing account on one of our supported OAuth providers. 

If you want to fork to submit patches and merge requests please continue reading here: https://docs.xfce.org/contribute/dev/git/start#gitlab_forks_and_merge_requests

Also feel free to reach out to us on the mailing list https://mail.xfce.org/mailman/listinfo/xfce4-dev

Bug #16835

Reported by:
Markus Elfring
Reported on: 2020-05-12
Last modified on: 2020-05-25

People

Assignee:
Ali Abdallah
CC List:
0 users

Version

Attachments

Additional information