diff options
author | TingPing <tingping@tingping.se> | 2013-01-19 13:10:54 -0800 |
---|---|---|
committer | TingPing <tingping@tingping.se> | 2013-01-19 13:10:54 -0800 |
commit | 8b49f5f78715bdc0f1a4fcdccc5a414dd6514096 (patch) | |
tree | c224e85b7ebb5a6c9854211dc7f11924a3ca2b0e /src/common/plugin.c | |
parent | a46f89998c4faa4b4768e18333ec98c5107ba90b (diff) | |
parent | 4e0daf047ed14e54ea7eeb2c1547cbe06332fbf4 (diff) |
Merge pull request #383 from RichardHitt/warnings
Correct almost all compiler warning issues
Diffstat (limited to 'src/common/plugin.c')
-rw-r--r-- | src/common/plugin.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/common/plugin.c b/src/common/plugin.c index d38085c5..c5b4aadc 100644 --- a/src/common/plugin.c +++ b/src/common/plugin.c @@ -1626,6 +1626,7 @@ hexchat_pluginpref_set_str_real (hexchat_plugin *pl, const char *var, const char char *buffer; char *buffer_tmp; char line_buffer[512]; /* the same as in cfg_put_str */ + char *line_bufp = line_buffer; char *canon; canon = g_strdup (pl->name); @@ -1687,7 +1688,7 @@ hexchat_pluginpref_set_str_real (hexchat_plugin *pl, const char *var, const char { prevSetting = 0; - while (fscanf (fpIn, " %[^\n]", &line_buffer) != EOF) /* read whole lines including whitespaces */ + while (fscanf (fpIn, " %[^\n]", line_bufp) != EOF) /* read whole lines including whitespaces */ { buffer_tmp = g_strdup_printf ("%s ", var); /* add one space, this way it works against var - var2 checks too */ @@ -1844,6 +1845,7 @@ hexchat_pluginpref_list (hexchat_plugin *pl, char* dest) FILE *fpIn; char confname[64]; char buffer[512]; /* the same as in cfg_put_str */ + char *bufp = buffer; char *token; token = g_strdup (pl->name); @@ -1860,7 +1862,7 @@ hexchat_pluginpref_list (hexchat_plugin *pl, char* dest) else /* existing config file, get list of settings */ { strcpy (dest, ""); /* clean up garbage */ - while (fscanf (fpIn, " %[^\n]", &buffer) != EOF) /* read whole lines including whitespaces */ + while (fscanf (fpIn, " %[^\n]", bufp) != EOF) /* read whole lines including whitespaces */ { token = strtok (buffer, "="); strncat (dest, token, strlen (token) - 1); |