Skip to content

Commit

Permalink
fix -Wself-assign compiler warnings (#2162)
Browse files Browse the repository at this point in the history
  • Loading branch information
nilason committed Feb 9, 2022
1 parent c37871b commit f6af67c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/arraystats/class.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ double AS_class_stdev(double *data, int count, int nbreaks, double *classbreaks)
(stats.mean - stats.stdev * scale / 2) -
stats.stdev * scale * (nbreaks / 2 - (i + 1));
/* classbreaks above the mean */
for (i = i; i < nbreaks; i++)
for (; i < nbreaks; i++)
classbreaks[i] =
(stats.mean + stats.stdev * scale / 2) +
stats.stdev * scale * (i - nbreaks / 2);
Expand All @@ -124,7 +124,7 @@ double AS_class_stdev(double *data, int count, int nbreaks, double *classbreaks)
classbreaks[i] =
stats.mean - stats.stdev * scale * (nbreaks / 2 - i);
/* classbreaks above the mean */
for (i = i; i < nbreaks; i++)
for (; i < nbreaks; i++)
classbreaks[i] =
stats.mean + stats.stdev * scale * (i - nbreaks / 2);
}
Expand Down Expand Up @@ -462,7 +462,7 @@ int AS_class_frequencies(double *data, int count, int nbreaks,
}

/*Now count cases in last class */
for (i = i; i < count; i++) {
for (; i < count; i++) {
frequencies[nbreaks]++;
}

Expand Down

0 comments on commit f6af67c

Please sign in to comment.