Skip to content
This repository has been archived by the owner on May 4, 2018. It is now read-only.

Commit

Permalink
unix: fix compiler warning
Browse files Browse the repository at this point in the history
Fix warning "for loop initial declaration used outside C99 mode" on openbsd.
  • Loading branch information
qbit authored and bnoordhuis committed Mar 27, 2012
1 parent 2b3ba91 commit 40e6373
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/unix/openbsd.c
Expand Up @@ -216,6 +216,7 @@ uv_err_t uv_cpu_info(uv_cpu_info_t** cpu_infos, int* count) {
int numcpus = 1;
static int which[] = {CTL_HW,HW_MODEL,0};
size_t size;
int i;
uv_cpu_info_t* cpu_info;

size = sizeof(model);
Expand Down Expand Up @@ -245,7 +246,7 @@ uv_err_t uv_cpu_info(uv_cpu_info_t** cpu_infos, int* count) {
size = sizeof(info);
which[0] = CTL_KERN;
which[1] = KERN_CPTIME2;
for (int i = 0; i < numcpus; i++) {
for (i = 0; i < numcpus; i++) {
which[2] = i;
size = sizeof(info);
if (sysctl(which, 3, &info, &size, NULL, 0) < 0) {
Expand Down

0 comments on commit 40e6373

Please sign in to comment.