From 383a4190caacb3ab3fc951898e02c64f2f77c3dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Thu, 30 Apr 2026 13:26:46 +0800 Subject: [PATCH] Comon (macOS): tidy Co-authored-by: Copilot --- src/common/apple/cf_helpers.c | 6 +++--- src/common/apple/osascript.m | 2 -- src/common/apple/smc_temps.c | 1 - 3 files changed, 3 insertions(+), 6 deletions(-) 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;