待辦事項 #41072

The definition of tagRAWHID is wrong

啟用日期: 2020-12-24 21:03 最後更新: 2021-02-08 01:11

回報者:
負責人:
(無)
類型:
狀態:
開啟
元件:
(無)
里程碑:
(無)
優先權:
5 - 中
嚴重程度:
5 - 中
處理結果:
檔案:
Vote
Score: 0
No votes
0.0% (0/0)
0.0% (0/0)

細節

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
評語

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
評語

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

編輯

Please login to add comment to this ticket » 登入