Fix a few compiler warnings

This commit is contained in:
Yevgen Muntyan 2015-12-25 18:10:10 -08:00
parent 068e05cb2d
commit 6a48dacf78
5 changed files with 6 additions and 6 deletions

View File

@ -697,7 +697,7 @@ moo_app_init_mac (G_GNUC_UNUSED MooApp *app)
static void
input_callback (char cmd,
const char *data,
guint len,
gsize len,
gpointer cb_data)
{
MooApp *app = cb_data;

View File

@ -2094,7 +2094,7 @@ hf_format_chunk_new (HFFormatType type,
chunk->type = type;
if (string)
chunk->string = g_strndup (string, len >= 0 ? len : strlen (string));
chunk->string = g_strndup (string, len >= 0 ? (gsize) len : strlen (string));
return chunk;
}

View File

@ -228,7 +228,7 @@ moo_ipc_send (GObject *sender,
gssize len)
{
GString *header;
gsize id_len;
guint id_len;
g_return_if_fail (!sender || G_IS_OBJECT (sender));
g_return_if_fail (id != NULL);

View File

@ -995,7 +995,7 @@ test_one_enum (GType enum_type,
TEST_EXPECT_WARNING (0, "%s", "string to enum");
if (!bad != _moo_value_convert (&sval, &eval))
if ((!bad) != _moo_value_convert (&sval, &eval))
{
if (!bad)
TEST_FAILED_MSG ("could not convert string '%s' to enum '%s'",
@ -1047,7 +1047,7 @@ test_one_flags (GType flags_type,
TEST_EXPECT_WARNING (0, "%s", "string to flags");
if (!bad != _moo_value_convert (&sval, &eval))
if ((!bad) != _moo_value_convert (&sval, &eval))
{
if (!bad)
TEST_FAILED_MSG ("could not convert string '%s' to flags type '%s'",

View File

@ -354,7 +354,7 @@ typedef struct {
static int
cache_glob_lookup_literal (const char *file_name,
const char *mime_types[],
int n_mime_types)
G_GNUC_UNUSED int n_mime_types)
{
const char *ptr;
int i, min, max, mid, cmp;