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

+4 -1
View File
@@ -191,11 +191,14 @@ int sensors_register_entry(struct i2c_client *client ,const char *prefix,
void sensors_deregister_entry(int id)
{
ctl_table *table;
char *temp;
id -= 256;
if (sensors_entries[id]) {
table = sensors_entries[id]->ctl_table;
unregister_sysctl_table(sensors_entries[id]);
kfree((void *) (table[4].procname));
/* Below two-step kfree is needed to keep gcc happy about const points */
(const char *) temp = table[4].procname;
kfree(temp);
kfree(table);
sensors_entries[id] = NULL;
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,58))