fix warning (#23)
diff --git a/cpu.go b/cpu.go index 2bceceb..2082a57 100644 --- a/cpu.go +++ b/cpu.go
@@ -16,6 +16,7 @@ // #endif // // #define HzToGHz(hz) ((hz) / 1000000000.0) +// #define BUFSIZE 512 // // UInt64 global_pCoreHz; // UInt64 global_eCoreHz; @@ -72,15 +73,14 @@ // io_iterator_t iter; // IOServiceGetMatchingServices(kIOMainPortDefault, matching, &iter); // -// const size_t bufsize = 512; // io_object_t obj; // while ((obj = IOIteratorNext(iter))) { -// char class[bufsize]; +// char class[BUFSIZE]; // IOObjectGetClass(obj, class); -// char name[bufsize]; +// char name[BUFSIZE]; // IORegistryEntryGetName(obj, name); // -// if (strncmp(name, "pmgr", bufsize) == 0) { +// if (strncmp(name, "pmgr", BUFSIZE) == 0) { // CFTypeRef pCoreRef = IORegistryEntryCreateCFProperty(obj, CFSTR("voltage-states5-sram"), kCFAllocatorDefault, 0); // CFTypeRef eCoreRef = IORegistryEntryCreateCFProperty(obj, CFSTR("voltage-states1-sram"), kCFAllocatorDefault, 0); //