Ticket #41072

The definition of tagRAWHID is wrong

Eröffnet am: 2020-12-24 21:03 Letztes Update: 2021-02-08 01:11

Auswertung:
Verantwortlicher:
(Keine)
Typ:
Status:
Offen
Komponente:
(Keine)
Meilenstein:
(Keine)
Priorität:
5 - Mittel
Schweregrad:
5 - Mittel
Lösung:
Keine
Datei:
Keine
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-Verlauf (3/4 Historien)

2020-12-24 21:03 Aktualisiert von: royqh1979
  • New Ticket "the definition of tagRAWHID is wrong" created
2020-12-29 06:35 Aktualisiert von: keith
Kommentar

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 Aktualisiert von: royqh1979
Kommentar

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 Aktualisiert von: keith
  • Details Updated
  • Summary Updated

Dateianhangliste

Keine Anhänge

Bearbeiten

Please login to add comment to this ticket » Anmelden