Removed some compiler warnings

All our own code (ie. anything not in the i2c directory) compiles now without
warnings, even with WARN=1 (which sets -Wall -Wstrict-prototypes -Wshadow
-Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wnested-externs
-Winline). There is one exception: the lex code (conf-lex.l) complains about
unused functions. That's flex' fault, not ours!

The i2c code still emits many warnings with the above flags; that's Simon's
problem.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@233 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Frodo Looijaard committed 1999-02-16 21:59:05 +00:00
1 parent 5402bf4b71
commit d78cd0cb5f
6 files changed
+14 -17

No files matched your search

+6 -11
View File
@@ -67,10 +67,9 @@ static int eeprom_command(struct i2c_client *client, unsigned int cmd,
static void eeprom_inc_use (struct i2c_client *client);
static void eeprom_dec_use (struct i2c_client *client);
static u16 swap_bytes(u16 val);
static int eeprom_read_value(struct i2c_client *client, u8 reg);
#if 0
static int eeprom_write_value(struct i2c_client *client, u8 reg, u16 value);
#endif
static void eeprom_contents(struct i2c_client *client, int operation, int ctl_name,
int *nrels_mag, long *results);
@@ -252,22 +251,18 @@ void eeprom_dec_use (struct i2c_client *client)
#endif
}
u16 swap_bytes(u16 val)
{
return (val >> 8) | (val << 8);
}
/* No swapping needed here! */
#if 0
/* No writes yet (PAE) */
int eeprom_write_value(struct i2c_client *client, u8 reg, u16 value)
{/*
{
if (reg == EEPROM_REG_CONF)
return smbus_write_byte_data(client->adapter,client->addr,reg,value);
else
return smbus_write_word_data(client->adapter,client->addr,reg,value); */
/* No writes yet (PAE) */
return 0;
}
#endif
void eeprom_update_client(struct i2c_client *client)
{
-1
View File
@@ -80,7 +80,6 @@ static int ltc1710_command(struct i2c_client *client, unsigned int cmd,
void *arg);
static void ltc1710_inc_use (struct i2c_client *client);
static void ltc1710_dec_use (struct i2c_client *client);
static u16 swap_bytes(u16 val);
static void ltc1710_switch1(struct i2c_client *client, int operation, int ctl_name,
int *nrels_mag, long *results);
static void ltc1710_switch2(struct i2c_client *client, int operation, int ctl_name,
+1 -1
View File
@@ -346,7 +346,7 @@ int lm78_detect_isa(struct isa_adapter *adapter)
/* OK, this is detection. */
if (err=find_sis(&address)) {
if ((err=find_sis(&address))) {
printk("SiS 5595 southbridge not found\n");
return err;
}