From 5c223ec5d55d82ab8dd1fc81c7cea5caf36ade45 Mon Sep 17 00:00:00 2001 From: TingPing Date: Fri, 22 Nov 2013 16:53:50 -0500 Subject: Fix more warnings --- src/common/cfgfiles.c | 8 +++----- src/common/plugin.c | 3 ++- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/common/cfgfiles.c b/src/common/cfgfiles.c index 8283765b..7d0e9c91 100644 --- a/src/common/cfgfiles.c +++ b/src/common/cfgfiles.c @@ -1085,12 +1085,10 @@ set_showval (session *sess, const struct prefs *var, char *tbuf) len = strlen (var->name); memcpy (tbuf, var->name, len); - dots = 29 - len; - - if (dots < 0) - { + if (len > 29) dots = 0; - } + else + dots = 29 - len; tbuf[len++] = '\003'; tbuf[len++] = '2'; diff --git a/src/common/plugin.c b/src/common/plugin.c index 228983f3..45746777 100644 --- a/src/common/plugin.c +++ b/src/common/plugin.c @@ -1548,7 +1548,8 @@ hexchat_list_int (hexchat_plugin *ph, hexchat_list *xlist, const char *name) { guint32 hash = str_hash (name); gpointer data = ph->context; - int tmp, type = LIST_CHANNELS; + int tmp = 0; + int type = LIST_CHANNELS; /* a NULL xlist is a shortcut to current "channels" context */ if (xlist) -- cgit 1.4.1