testgui: fix compile warnings on macOS #51

Merged
z3ntu merged 2 commits from testgui-mac-warnings into master 2019-07-23 15:31:04 -05:00
z3ntu commented 2019-07-19 10:02:04 -05:00 (Migrated from github.com)

The first commit should be backwards compatible (< 10.12), as I've added a define for the old type.

The second commit I'm not sure about, from what I could fine it was an API change in NSApplication in macOS 10.10, so it might not compile on versions before that?

The first commit should be backwards compatible (< 10.12), as I've added a define for the old type. The second commit I'm not sure about, from what I could fine it was an API change in NSApplication in macOS 10.10, so it might not compile on versions before that?
Youw (Migrated from github.com) reviewed 2019-07-19 10:08:41 -05:00
@ -8,10 +8,19 @@
#include <fx.h>
Youw (Migrated from github.com) commented 2019-07-19 10:08:41 -05:00

lets have more friendly name for this constant, e.g.: MAC_OS_X_VERSION_10_12

lets have more friendly name for this constant, e.g.: MAC_OS_X_VERSION_10_12
z3ntu (Migrated from github.com) reviewed 2019-07-19 11:13:19 -05:00
@ -8,10 +8,19 @@
#include <fx.h>
z3ntu (Migrated from github.com) commented 2019-07-19 11:13:19 -05:00

This constant isn't available under macOS 10.12 so we'd have to add

#ifndef MAC_OS_X_VERSION_10_12
#define MAC_OS_X_VERSION_10_12 101200
#endif

Should I do that?

This constant isn't available under macOS 10.12 so we'd have to add ```c #ifndef MAC_OS_X_VERSION_10_12 #define MAC_OS_X_VERSION_10_12 101200 #endif ``` Should I do that?
Youw (Migrated from github.com) reviewed 2019-07-19 11:34:56 -05:00
@ -8,10 +8,19 @@
#include <fx.h>
Youw (Migrated from github.com) commented 2019-07-19 11:34:56 -05:00

what about this solution ?
your suggestion is fine by me as well
anything is better than (unnamed) magic numbers

what about [this solution](https://stackoverflow.com/a/41497822/3697939) ? your suggestion is fine by me as well anything is better than (unnamed) magic numbers
Qbicz (Migrated from github.com) approved these changes 2019-07-23 12:16:14 -05:00
Youw (Migrated from github.com) approved these changes 2019-07-23 14:34:57 -05:00
Sign in to join this conversation.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-libusb/hidapi!51
No description provided.