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