diff --git a/src/common/apple/cf_helpers.c b/src/common/apple/cf_helpers.c index e080f4dec..e7a9c4fa1 100644 --- a/src/common/apple/cf_helpers.c +++ b/src/common/apple/cf_helpers.c @@ -24,10 +24,10 @@ const char* ffCfNumGetInt(CFTypeRef cf, int32_t* result) { } return NULL; } else if (CFGetTypeID(cf) == CFDataGetTypeID()) { - if (CFDataGetLength((CFDataRef) cf) != sizeof(int)) { - return "Data length is not sizeof(int)"; + if (CFDataGetLength((CFDataRef) cf) != sizeof(*result)) { + return "Data length is not sizeof(int32_t)"; } - CFDataGetBytes((CFDataRef) cf, CFRangeMake(0, sizeof(int)), (uint8_t*) result); + CFDataGetBytes((CFDataRef) cf, CFRangeMake(0, sizeof(*result)), (uint8_t*) result); return NULL; } diff --git a/src/common/apple/osascript.m b/src/common/apple/osascript.m index 8b01ba069..f17af0369 100644 --- a/src/common/apple/osascript.m +++ b/src/common/apple/osascript.m @@ -1,8 +1,6 @@ #include "osascript.h" #import -#import -#import bool ffOsascript(const char* input, FFstrbuf* result) { diff --git a/src/common/apple/smc_temps.c b/src/common/apple/smc_temps.c index 07b2d3bc9..a71f94a5d 100644 --- a/src/common/apple/smc_temps.c +++ b/src/common/apple/smc_temps.c @@ -3,7 +3,6 @@ #include "common/stringUtils.h" #include -#include #include static const char kSmcCmdReadBytes = 5;