2
0
mirror of https://github.com/lm-sensors/lm-sensors synced 2025-08-30 22:05:11 +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 == feature->number) {
sensors_feature_type type = sensors_feature_get_type(iter);
unsigned int index;
unsigned int indx;
if (type == SENSORS_FEATURE_UNKNOWN)
continue;
index = type - first_val - 1;
if (index >= size) {
indx = type - first_val - 1;
if (indx >= size) {
printf("ERROR: Bug in sensors: index out of bound");
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);
/* some chips don't have all the features they claim to have */
/* has_features[index] = (feature_vals[index] != 127); */
has_features[index] = 1;
/* has_features[indx] = (feature_vals[indx] != 127); */
has_features[indx] = 1;
}
}