Fix more warnings

This commit is contained in:
TingPing 2013-11-22 16:53:50 -05:00
parent a656cee382
commit 5c223ec5d5
2 changed files with 5 additions and 6 deletions

View File

@ -1085,12 +1085,10 @@ set_showval (session *sess, const struct prefs *var, char *tbuf)
len = strlen (var->name); len = strlen (var->name);
memcpy (tbuf, var->name, len); memcpy (tbuf, var->name, len);
dots = 29 - len; if (len > 29)
if (dots < 0)
{
dots = 0; dots = 0;
} else
dots = 29 - len;
tbuf[len++] = '\003'; tbuf[len++] = '\003';
tbuf[len++] = '2'; tbuf[len++] = '2';

View File

@ -1548,7 +1548,8 @@ hexchat_list_int (hexchat_plugin *ph, hexchat_list *xlist, const char *name)
{ {
guint32 hash = str_hash (name); guint32 hash = str_hash (name);
gpointer data = ph->context; 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 */ /* a NULL xlist is a shortcut to current "channels" context */
if (xlist) if (xlist)