mirror of
https://github.com/irssi/irssi.git
synced 2026-08-10 12:23:37 +02:00
Enabled lots of GCC warnings, fixed those that were easy to fix.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@456 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
f8aa81b73c
commit
dcc2e89b2e
25 changed files with 84 additions and 106 deletions
|
|
@ -27,8 +27,8 @@
|
|||
|
||||
#include "completion.h"
|
||||
|
||||
#define wordreplace_find(replace) \
|
||||
iconfig_list_find("replaces", "text", replace, "replace")
|
||||
#define wordreplace_find(word) \
|
||||
iconfig_list_find("replaces", "text", word, "replace")
|
||||
|
||||
#define completion_find(completion) \
|
||||
iconfig_list_find("completions", "short", completion, "long")
|
||||
|
|
|
|||
|
|
@ -67,7 +67,8 @@ static void cmd_set(char *data)
|
|||
{
|
||||
GHashTable *optlist;
|
||||
GSList *sets, *tmp;
|
||||
char *key, *value, *last_section;
|
||||
const char *last_section;
|
||||
char *key, *value;
|
||||
void *free_arg;
|
||||
int found, clear;
|
||||
|
||||
|
|
|
|||
|
|
@ -361,14 +361,16 @@ static void cmd_format(const char *data)
|
|||
"format", &optlist, &module, &key, &value))
|
||||
return;
|
||||
|
||||
modules = get_sorted_modules();
|
||||
if (*module != '\0' && theme_search(modules, module) == NULL) {
|
||||
modules = get_sorted_modules();
|
||||
if (*module == '\0')
|
||||
module = NULL;
|
||||
else if (theme_search(modules, module) == NULL) {
|
||||
/* first argument isn't module.. */
|
||||
cmd_params_free(free_arg);
|
||||
if (!cmd_get_params(data, &free_arg, 2 | PARAM_FLAG_GETREST | PARAM_FLAG_OPTIONS,
|
||||
"format", &optlist, &key, &value))
|
||||
return;
|
||||
module = "";
|
||||
module = NULL;
|
||||
}
|
||||
|
||||
reset = FALSE;
|
||||
|
|
@ -383,7 +385,7 @@ static void cmd_format(const char *data)
|
|||
for (tmp = modules; tmp != NULL; tmp = tmp->next) {
|
||||
THEME_SEARCH_REC *rec = tmp->data;
|
||||
|
||||
if (*module == '\0' || g_strcasecmp(rec->short_name, module) == 0)
|
||||
if (module == NULL || g_strcasecmp(rec->short_name, module) == 0)
|
||||
theme_show(rec, key, value, reset);
|
||||
}
|
||||
g_slist_foreach(modules, (GFunc) g_free, NULL);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue