compiledata.c: Fix -Wunused-result warning.

This commit is contained in:
Juho Hiltunen
2018-05-01 19:02:21 +01:00
committed by Reece H. Dunn
parent afc29cd776
commit f4aec775cf
+10 -9
View File
@@ -1395,16 +1395,17 @@ static int LoadEnvelope2(FILE *f, const char *fname)
unsigned char env[ENV_LEN];
n_points = 0;
fgets(line_buf, sizeof(line_buf), f); // skip first line
while (!feof(f)) {
if (fgets(line_buf, sizeof(line_buf), f) == NULL)
break;
if (fgets(line_buf, sizeof(line_buf), f) != NULL) { ; // skip first line, then loop
while (!feof(f)) {
if (fgets(line_buf, sizeof(line_buf), f) == NULL)
break;
env_lin[n_points] = 0;
n = sscanf(line_buf, "%f %f %d", &env_x[n_points], &env_y[n_points], &env_lin[n_points]);
if (n >= 2) {
env_x[n_points] *= (float)1.28; // convert range 0-100 to 0-128
n_points++;
env_lin[n_points] = 0;
n = sscanf(line_buf, "%f %f %d", &env_x[n_points], &env_y[n_points], &env_lin[n_points]);
if (n >= 2) {
env_x[n_points] *= (float)1.28; // convert range 0-100 to 0-128
n_points++;
}
}
}
if (n_points > 0) {