Eliminate some more warnings and hide less warnings in VS
This commit is contained in:
parent
584b89bb02
commit
ed970381fb
@ -45,7 +45,8 @@ void
|
|||||||
list_addentry (GSList ** list, char *cmd, char *name)
|
list_addentry (GSList ** list, char *cmd, char *name)
|
||||||
{
|
{
|
||||||
struct popup *pop;
|
struct popup *pop;
|
||||||
int cmd_len = 1, name_len;
|
size_t name_len;
|
||||||
|
size_t cmd_len = 1;
|
||||||
|
|
||||||
/* remove <2.8.0 stuff */
|
/* remove <2.8.0 stuff */
|
||||||
if (!strcmp (cmd, "away") && !strcmp (name, "BACK"))
|
if (!strcmp (cmd, "away") && !strcmp (name, "BACK"))
|
||||||
@ -909,35 +910,49 @@ save_config (void)
|
|||||||
static void
|
static void
|
||||||
set_showval (session *sess, const struct prefs *var, char *tbuf)
|
set_showval (session *sess, const struct prefs *var, char *tbuf)
|
||||||
{
|
{
|
||||||
int len, dots, j;
|
size_t len;
|
||||||
|
size_t dots;
|
||||||
|
size_t j;
|
||||||
|
|
||||||
len = strlen (var->name);
|
len = strlen (var->name);
|
||||||
memcpy (tbuf, var->name, len);
|
memcpy (tbuf, var->name, len);
|
||||||
dots = 29 - len;
|
dots = 29 - len;
|
||||||
|
|
||||||
if (dots < 0)
|
if (dots < 0)
|
||||||
|
{
|
||||||
dots = 0;
|
dots = 0;
|
||||||
|
}
|
||||||
|
|
||||||
tbuf[len++] = '\003';
|
tbuf[len++] = '\003';
|
||||||
tbuf[len++] = '2';
|
tbuf[len++] = '2';
|
||||||
for (j=0;j<dots;j++)
|
|
||||||
|
for (j = 0; j < dots; j++)
|
||||||
|
{
|
||||||
tbuf[j + len] = '.';
|
tbuf[j + len] = '.';
|
||||||
|
}
|
||||||
|
|
||||||
len += j;
|
len += j;
|
||||||
|
|
||||||
switch (var->type)
|
switch (var->type)
|
||||||
{
|
{
|
||||||
case TYPE_STR:
|
case TYPE_STR:
|
||||||
sprintf (tbuf + len, "\0033:\017 %s\n",
|
sprintf (tbuf + len, "\0033:\017 %s\n", (char *) &prefs + var->offset);
|
||||||
(char *) &prefs + var->offset);
|
break;
|
||||||
break;
|
case TYPE_INT:
|
||||||
case TYPE_INT:
|
sprintf (tbuf + len, "\0033:\017 %d\n", *((int *) &prefs + var->offset));
|
||||||
sprintf (tbuf + len, "\0033:\017 %d\n",
|
break;
|
||||||
*((int *) &prefs + var->offset));
|
case TYPE_BOOL:
|
||||||
break;
|
if (*((int *) &prefs + var->offset))
|
||||||
case TYPE_BOOL:
|
{
|
||||||
if (*((int *) &prefs + var->offset))
|
sprintf (tbuf + len, "\0033:\017 %s\n", "ON");
|
||||||
sprintf (tbuf + len, "\0033:\017 %s\n", "ON");
|
}
|
||||||
else
|
else
|
||||||
sprintf (tbuf + len, "\0033:\017 %s\n", "OFF");
|
{
|
||||||
break;
|
sprintf (tbuf + len, "\0033:\017 %s\n", "OFF");
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
PrintText (sess, tbuf);
|
PrintText (sess, tbuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -127,7 +127,7 @@
|
|||||||
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;$(OwnFlags);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;$(OwnFlags);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<AdditionalIncludeDirectories>$(DepsRoot)\include;$(Glib);$(Gtk);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(DepsRoot)\include;$(Glib);$(Gtk);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||||
<DisableSpecificWarnings>4244;4267</DisableSpecificWarnings>
|
<DisableSpecificWarnings></DisableSpecificWarnings>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Windows</SubSystem>
|
<SubSystem>Windows</SubSystem>
|
||||||
|
@ -124,7 +124,7 @@
|
|||||||
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;$(OwnFlags);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;$(OwnFlags);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<AdditionalIncludeDirectories>$(DepsRoot)\include;$(Glib);$(Gtk);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(DepsRoot)\include;$(Glib);$(Gtk);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||||
<DisableSpecificWarnings>4244;4267;4996</DisableSpecificWarnings>
|
<DisableSpecificWarnings>4996</DisableSpecificWarnings>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Windows</SubSystem>
|
<SubSystem>Windows</SubSystem>
|
||||||
|
@ -4241,7 +4241,8 @@ handle_say (session *sess, char *text, int check_spch)
|
|||||||
|
|
||||||
if (strlen (text) > max)
|
if (strlen (text) > max)
|
||||||
{
|
{
|
||||||
int i = 0, size;
|
unsigned int i = 0;
|
||||||
|
int size;
|
||||||
|
|
||||||
/* traverse the utf8 string and find the nearest cut point that
|
/* traverse the utf8 string and find the nearest cut point that
|
||||||
doesn't split 1 char in half */
|
doesn't split 1 char in half */
|
||||||
|
@ -1379,15 +1379,21 @@ base64_encode (char *to, char *from, unsigned int len)
|
|||||||
}
|
}
|
||||||
if (len)
|
if (len)
|
||||||
{
|
{
|
||||||
char three[3]={0,0,0};
|
char three[3] = {0,0,0};
|
||||||
int i=0;
|
unsigned int i;
|
||||||
for (i=0;i<len;i++)
|
for (i = 0; i < len; i++)
|
||||||
|
{
|
||||||
three[i] = *from++;
|
three[i] = *from++;
|
||||||
|
}
|
||||||
three_to_four (three, to);
|
three_to_four (three, to);
|
||||||
if (len == 1)
|
if (len == 1)
|
||||||
|
{
|
||||||
to[2] = to[3] = '=';
|
to[2] = to[3] = '=';
|
||||||
|
}
|
||||||
else if (len == 2)
|
else if (len == 2)
|
||||||
|
{
|
||||||
to[3] = '=';
|
to[3] = '=';
|
||||||
|
}
|
||||||
to += 4;
|
to += 4;
|
||||||
};
|
};
|
||||||
to[0] = 0;
|
to[0] = 0;
|
||||||
|
@ -65,7 +65,7 @@
|
|||||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;$(OwnFlags);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;$(OwnFlags);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<AdditionalIncludeDirectories>$(DepsRoot)\include;$(Glib);$(Gtk);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(DepsRoot)\include;$(Glib);$(Gtk);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||||
<DisableSpecificWarnings>4244;4267</DisableSpecificWarnings>
|
<DisableSpecificWarnings>4244</DisableSpecificWarnings>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Windows</SubSystem>
|
<SubSystem>Windows</SubSystem>
|
||||||
|
@ -62,7 +62,7 @@
|
|||||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;$(OwnFlags);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;$(OwnFlags);%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<AdditionalIncludeDirectories>$(DepsRoot)\include;$(Glib);$(Gtk);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>$(DepsRoot)\include;$(Glib);$(Gtk);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||||
<DisableSpecificWarnings>4244;4267;4996</DisableSpecificWarnings>
|
<DisableSpecificWarnings>4244;4996</DisableSpecificWarnings>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Windows</SubSystem>
|
<SubSystem>Windows</SubSystem>
|
||||||
|
@ -837,9 +837,12 @@ setup_hscale_cb (GtkHScale *wid, const setting *set)
|
|||||||
{
|
{
|
||||||
static int tag = 0;
|
static int tag = 0;
|
||||||
|
|
||||||
setup_set_int (&setup_prefs, set, gtk_range_get_value(GTK_RANGE(wid)));
|
setup_set_int (&setup_prefs, set, (int) gtk_range_get_value (GTK_RANGE (wid)));
|
||||||
if(tag == 0)
|
|
||||||
tag = g_idle_add ((GSourceFunc)setup_apply_tint, &tag);
|
if (tag == 0)
|
||||||
|
{
|
||||||
|
tag = g_idle_add ((GSourceFunc) setup_apply_tint, &tag);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
Reference in New Issue
Block a user