Fix ioctl sign-extension warning on FreeBSD #393
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I was running Motion 4.0.1 on FreeBSD 10.3-STABLE amd64. After connecting a webcam (Logitech C920). the console gives a continues stream of messages like this:
May 26 13:42:11 aurora kernel: WARNING pid 40273 (motion): ioctl sign-extension ioctl ffffffffc058560f
May 26 13:42:11 aurora kernel: WARNING pid 40273 (motion): ioctl sign-extension ioctl ffffffffc0585611
May 26 13:42:11 aurora kernel: WARNING pid 40273 (motion): ioctl sign-extension ioctl ffffffffc058560f
May 26 13:42:11 aurora kernel: WARNING pid 40273 (motion): ioctl sign-extension ioctl ffffffffc0585611
... etc.
This patch fixes that by making sure that the ioct() call gets a proper unsigned long request parameter.