You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hidapi/mac/hid.c:795:39: warning: 'kIOMasterPortDefault' is deprecated: first deprecated in macOS 12.0 [-Wdeprecated-declarations]
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:123:19: note: 'kIOMasterPortDefault' has been explicitly marked deprecated here
In file included from ../go/pkg/mod/github.com/bearsh/[email protected]/hid_enabled.go:46:
hidapi/mac/hid.c:800:34: warning: 'kIOMasterPortDefault' is deprecated: first deprecated in macOS 12.0 [-Wdeprecated-declarations]
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:123:19: note: 'kIOMasterPortDefault' has been explicitly marked deprecated here
Activity
Youw commentedon Feb 7, 2022
Has Apple provided an alternative?
szechyjs commentedon Feb 8, 2022
It looks like its
kIOMainPortDefaultperhaps something like...
mcuee commentedon Feb 9, 2022
Interestingly libusb uses a simple way to do this. I am not saying it is a better way though.
https://github.com/libusb/libusb/blob/master/libusb/os/darwin_usb.c#L57
Ref:
https://developer.apple.com/documentation/iokit/kiomasterportdefault
https://developer.apple.com/documentation/iokit/kiomainportdefault
This is a synonym for NULL, if you'd rather use a named constant.
Youw commentedon Feb 9, 2022
Thanks for the alternative
Don't use deprecated kIOMasterPortDefault
Don't use deprecated kIOMasterPortDefault (#406)
Switch deprecated libusb call
fix: potential null dereference
fix: potential null dereference