Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

netdev2: send/recv length arguments should be unsigned #5717

Closed
jnohlgard opened this issue Aug 2, 2016 · 2 comments
Closed

netdev2: send/recv length arguments should be unsigned #5717

jnohlgard opened this issue Aug 2, 2016 · 2 comments
Assignees
Labels
Area: network Area: Networking Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)

Comments

@jnohlgard
Copy link
Member

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) {
                 ^
@jnohlgard jnohlgard added Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) Area: network Area: Networking labels Aug 2, 2016
@jnohlgard jnohlgard added this to the Release 2016.10 milestone Aug 2, 2016
@miri64
Copy link
Member

miri64 commented Aug 2, 2016

Agreed. See #5495

@miri64
Copy link
Member

miri64 commented Oct 14, 2016

Fixed in #5495.

@miri64 miri64 closed this as completed Oct 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: network Area: Networking Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)
Projects
None yet
Development

No branches or pull requests

2 participants