Ticket #64 (closed defect: fixed)
Opened 3 years ago
Last modified 18 months ago
libusb invalidly uses reserved identifiers when naming variables, structs, etc.
| Reported by: | rogueresearch | Owned by: | segher |
|---|---|---|---|
| Milestone: | Component: | libusb-1.0 | |
| Keywords: | Cc: | ||
| Blocked By: | Blocks: |
Description
The ISO/IEC 9899:1999 standard in Section 7.1.3, "Reserved Identifiers" describes how several naming schemes are reserved, notably "All identifiers that begin with an underscore and either an uppercase letter or another underscore are always reserved for any use."
libusb violates this in several places, ex:
- include guards like #define LIBUSB_THREADS_POSIX_H
- struct name: darwin_interface
- etc. etc.
See also:
Attachments
Change History
comment:1 Changed 3 years ago by segher
- Owner set to segher
- Status changed from new to accepted
comment:2 follow-up: ↓ 3 Changed 3 years ago by rogueresearch
No, I have no patch.
To be frank, I'm not willing (currently) to invest the time in creating such a patch, because patches do not seem to get accepted (as per recent mailing list discussions).
comment:3 in reply to: ↑ 2 Changed 3 years ago by segher
No, I have no patch.
To be frank, I'm not willing (currently) to invest the time in creating such a patch,
That's understandable. This isn't very high priority anyway; it
doesn't have a high probability of causing problems in practice.
because patches do not seem to get accepted (as per recent mailing list discussions).
Don't believe the naysayers. The only way to *ensure* nothing
happens is to not send patches! ;-)
comment:4 follow-up: ↓ 5 Changed 3 years ago by rogueresearch
My tiny patches in 63 and 28 have not been accepted; when and if they are, then maybe I'll invest time in this, until then, I'm with the naysayers I'm afraid.
comment:5 in reply to: ↑ 4 Changed 2 years ago by stuge
Replying to rogueresearch:
My tiny patches in 63 and 28 have not been accepted; when and if they are, then maybe I'll invest time in this, until then, I'm with the naysayers I'm afraid.
I'm sorry that you feel that your patches have been ignored because of the lack of feedback. I can understand it. Let me assure you that your work is very much appreciated, and thanks to it being stored in tickets it can not, and will not, be overlooked.
comment:6 Changed 2 years ago by hjelmn
The attached patch (against libusb-stuge) is a first attempt at fixing this bug. Please review.
comment:7 Changed 18 months ago by Nathan Hjelm <hjelmn@…>
- Resolution set to fixed
- Status changed from accepted to closed
ACK. Got patches? It's best not to do one mega-patch.