2
0
mirror of https://github.com/lm-sensors/lm-sensors synced 2025-09-02 07:15:39 +00:00

Warning fix ("index" is a standard libc function.)

git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4511 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Jean Delvare
2007-06-28 14:46:08 +00:00
parent 92b5982180
commit a6c3c36f00

View File

@@ -64,23 +64,23 @@ static void sensors_get_available_features(const sensors_chip_name *name,
iter->mapping != SENSORS_NO_MAPPING && iter->mapping != SENSORS_NO_MAPPING &&
iter->mapping == feature->number) { iter->mapping == feature->number) {
sensors_feature_type type = sensors_feature_get_type(iter); sensors_feature_type type = sensors_feature_get_type(iter);
unsigned int index; unsigned int indx;
if (type == SENSORS_FEATURE_UNKNOWN) if (type == SENSORS_FEATURE_UNKNOWN)
continue; continue;
index = type - first_val - 1; indx = type - first_val - 1;
if (index >= size) { if (indx >= size) {
printf("ERROR: Bug in sensors: index out of bound"); printf("ERROR: Bug in sensors: index out of bound");
return; return;
} }
if (get_feature_value(name, iter, &feature_vals[index])) if (get_feature_value(name, iter, &feature_vals[indx]))
printf("ERROR: Can't get %s data!\n", iter->name); printf("ERROR: Can't get %s data!\n", iter->name);
/* some chips don't have all the features they claim to have */ /* some chips don't have all the features they claim to have */
/* has_features[index] = (feature_vals[index] != 127); */ /* has_features[indx] = (feature_vals[indx] != 127); */
has_features[index] = 1; has_features[indx] = 1;
} }
} }