halo / LinkLiar

:link: Link-Layer MAC spoofing GUI for macOS
http://halo.github.io/LinkLiar
MIT License
1.23k stars 84 forks source link

Small code issue #30

Closed TheMuffinPony closed 6 years ago

TheMuffinPony commented 6 years ago

In Xcode, going to LinkLiar/LinkTools/FileObserver.swift:41 throws error C function pointer signature '(ConstFSEventStreamRef, UnsafeMutableRawPointer?, Int, UnsafeMutableRawPointer, UnsafePointer<FSEventStreamEventFlags>?, UnsafePointer<FSEventStreamEventId>?) -> Void' (aka '(OpaquePointer, Optional<UnsafeMutableRawPointer>, Int, UnsafeMutableRawPointer, Optional<UnsafePointer<UInt32>>, Optional<UnsafePointer<UInt64>>) -> ()') is not compatible with expected type 'FSEventStreamCallback' (aka '@convention(c) (OpaquePointer, Optional<UnsafeMutableRawPointer>, Int, UnsafeMutableRawPointer, UnsafePointer<UInt32>, UnsafePointer<UInt64>) -> ()’) when compiling.

Also, LinkLiar/LinkTools/MACAddress.swift throws three warnings: 'characters’ is deprecated: Please use String or Substring directly. for each return statement. It seems to be fixed by just deleting characters...

halo commented 6 years ago

Hi!

Thank you for your report!

Which version of Xcode are you using? I don't see these compiler errors in Xcode 9.2 in master.

In fact, I believe these errors were fixed a couple of weeks ago in this commit could you double check that you are using the latest master branch? Calling the method .characters for example is not in the code base any more see this search.

TheMuffinPony commented 6 years ago

Well, what do you know. I screwed up and downloaded the wrong file somehow...