Skip to content

Commit

Permalink
Small tweek to suit older MacMini compiler. (lavoiesl#15)
Browse files Browse the repository at this point in the history
* Small tweek to suit older MacMini compiler.
  • Loading branch information
heegard authored and lavoiesl committed May 16, 2018
1 parent e4585d3 commit df0a097
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions smc.c
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,8 @@ int main(int argc, char *argv[])

SMCOpen();
double temperature = SMCGetTemperature(SMC_KEY_CPU_TEMP);
for (int i = 0; i < 10; i++) {
int i;
for (i = 0; i < 10; i++) {
char key[5] = SMC_KEY_FAN0_RPM_CUR;
key[1] += i;
double speed = SMCGetFanSpeed(key);
Expand All @@ -228,7 +229,8 @@ int main(int argc, char *argv[])

printf("%0.1f°%c", temperature, scale);
if (fan) {
for (int i = 0; i < nfans; i++) {
int i;
for (i = 0; i < nfans; i++) {
printf(" %0.1frpm", fans[i]);
}
}
Expand Down

0 comments on commit df0a097

Please sign in to comment.