Skip to content

Commit 1230fad

Browse files
authored
darwin: fix build warnings (#4073)
1 parent a939d64 commit 1230fad

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/unix/darwin.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ int uv_cpu_info(uv_cpu_info_t** cpu_infos, int* count) {
209209
if (cpuspeed == 0)
210210
/* If sysctl hw.cputype == CPU_TYPE_ARM64, the correct value is unavailable
211211
* from Apple, but we can hard-code it here to a plausible value. */
212-
cpuspeed = 2400000000;
212+
cpuspeed = 2400000000U;
213213

214214
if (host_processor_info(mach_host_self(), PROCESSOR_CPU_LOAD_INFO, &numcpus,
215215
(processor_info_array_t*)&info,
@@ -235,7 +235,7 @@ int uv_cpu_info(uv_cpu_info_t** cpu_infos, int* count) {
235235
cpu_info->cpu_times.irq = 0;
236236

237237
cpu_info->model = uv__strdup(model);
238-
cpu_info->speed = cpuspeed/1000000;
238+
cpu_info->speed = (int)(cpuspeed / 1000000);
239239
}
240240
vm_deallocate(mach_task_self(), (vm_address_t)info, msg_type);
241241

0 commit comments

Comments
 (0)