• Emmanuel Fleury's avatar
    Fixing various warnings in glib/gvariant-parser.c · a7aac03e
    Emmanuel Fleury authored
    glib/gvariant-parser.c: In function ‘number_get_value’:
    glib/gvariant-parser.c:1924:46: error: operand of ?: changes signedness from ‘int’ to ‘guint64’ {aka ‘long unsigned int’} due to unsignedness of other operand [-Werror=sign-compare]
           return g_variant_new_int16 (negative ? -((gint16) abs_val) : abs_val);
                                                 ^~~~~~~~~~~~~~~~~~~
    glib/gvariant-parser.c:1934:46: error: operand of ?: changes signedness from ‘int’ to ‘guint64’ {aka ‘long unsigned int’} due to unsignedness of other operand [-Werror=sign-compare]
           return g_variant_new_int32 (negative ? -((gint32) abs_val) : abs_val);
                                                  ^~~~~~~~~~~~~~~~~~~
    glib/gvariant-parser.c:1944:46: error: operand of ?: changes signedness from ‘long int’ to ‘guint64’ {aka ‘long unsigned int’} due to unsignedness of other operand [-Werror=sign-compare]
           return g_variant_new_int64 (negative ? -((gint64) abs_val) : abs_val);
                                                      ^~~~~~~~~~~~~~~~~~~
    glib/gvariant-parser.c:1954:47: error: operand of ?: changes signedness from ‘int’ to ‘guint64’ {aka ‘long unsigned int’} due to unsignedness of other operand [-Werror=sign-compare]
           return g_variant_new_handle (negative ? -((gint32) abs_val) : abs_val);
                                                       ^~~~~~~~~~~~~~~~~~~
    glib/gvariant-parser.c: In function ‘g_variant_parse_error_print_context’:
    glib/gvariant-parser.c:2785:17: error: comparison of integer expressions of different signedness: ‘gint’ {aka ‘int’} and ‘size_t’ {aka ‘long unsigned int’} [-Werror=sign-compare]
           if (point >= strlen (source_str))
                     ^~
    a7aac03e
gvariant-parser.c 71.1 KB