Ticket #41072

The definition of tagRAWHID is wrong

Open Date: 2020-12-24 21:03 Last Update: 2021-02-08 01:11

Reporter:
Owner:
(None)
Type:
Status:
Open
Component:
(None)
MileStone:
(None)
Priority:
5 - Medium
Severity:
5 - Medium
Resolution:
None
File:
None
Vote
Score: 0
No votes
0.0% (0/0)
0.0% (0/0)

Details

According to MSDN https://docs.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-rawhid
the definition of tagRAWHID is as the following:

  1. typedef struct tagRAWHID {
  2. ...
  3. BYTE bRawData[1];
  4. } ...;
but in mingw’s win32.h, the definition is :
  1. typedef struct tagRAWHID
  2. {
  3. ...
  4. BYTE bRawData;
  5. } ...;

Freeglut 3.2.1 can't compile with this definition, the error is :
F:\Temp\test\freeglut-3.2.1\src\mswin\fg_spaceball_mswin.c:169:71: error: subscripted value is neither array nor pointer nor vector
  169 |                 short* pnData = (short*)(&pRawInput->data.hid.bRawData[1]);

Ticket History (3/4 Histories)

2020-12-24 21:03 Updated by: royqh1979
  • New Ticket "the definition of tagRAWHID is wrong" created
2020-12-29 06:35 Updated by: keith
Comment

Thank you for the report, but seriously, I do wish that users would verify their input, when submitting reports ... not only have you provided an invalid reference to the header file, in which the errant definition may be found, but your indication as to the correct definition is every bit as wrong as that which you say is wrong! (The "preview" facility is provided for a purpose; had you used it, you might have seen your error, before you publicly humiliated yourself).

Furthermore, you need to furnish a small, self contained, complete example, which I can use as a test case, both to verify your report, and any ensuing correction which I may adopt; telling me that you can't compile freeglut-3.2.1 is not sufficient.

2020-12-29 08:09 Updated by: royqh1979
Comment

Sorry for the error, but i don't know how to edit the ticket. And I don't know how to input '[ 1 ]' without spaces among '[' , '1' and ']' correctly.

But I think I have give enough info for u to investigate the problem.

And I really don't know why you don't use github which has more users and much easier to submit PR.

And I have switched to mingw-w64 and u don't need to investigate any more, thanks any way.

2021-02-08 01:11 Updated by: keith
  • Details Updated
  • Summary Updated

Attachment File List

No attachments

Edit

Please login to add comment to this ticket » Login