-
Notifications
You must be signed in to change notification settings - Fork 2.1k
netdev2: send/recv length arguments should be unsigned #5717
Copy link
Copy link
Closed
Labels
Area: networkArea: NetworkingArea: NetworkingType: bugThe issue reports a bug / The PR fixes a bug (including spelling errors)The issue reports a bug / The PR fixes a bug (including spelling errors)
Milestone
Description
The length arguments on some of the functions declared in the netdev2 API are signed, which does not make sense and causes warnings in some driver implementations when -Wsign-compare is used.
https://github.com/RIOT-OS/RIOT/blob/master/drivers/include/net/netdev2.h#L140
https://github.com/RIOT-OS/RIOT/blob/master/drivers/include/net/netdev2.h#L161
Warning in at86rf2xx:
https://github.com/RIOT-OS/RIOT/blob/master/drivers/at86rf2xx/at86rf2xx_netdev.c#L156
riot/drivers/at86rf2xx/at86rf2xx_netdev.c:156:17: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
if (pkt_len > len) {
^
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Area: networkArea: NetworkingArea: NetworkingType: bugThe issue reports a bug / The PR fixes a bug (including spelling errors)The issue reports a bug / The PR fixes a bug (including spelling errors)