mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-21 16:38:54 +02:00
Bug 556543 – reduce compiler warnings
2008-10-16 Tommi Komulainen <tommi.komulainen@iki.fi> Bug 556543 – reduce compiler warnings * girepository/ginfo.c: * girepository/girepository.c (register_internal, count_interfaces, find_interface, find_namespace_version, parse_version, g_irepository_require): * girepository/girmodule.c (g_ir_module_build_typelib): * girepository/girnode.c (init_stats, dump_stats, _g_irnode_init_stats, _g_irnode_dump_stats, g_ir_node_can_have_member): * girepository/girparser.c (firstpass_end_element_handler, locate_gir, parse_basic, parse_type_internal, resolve_aliases, start_alias, start_type, end_type_top, parse_include, cleanup, post_filter): * girepository/gtypelib.c (validate_function_blob, validate_enum_blob): * giscanner/giscannermodule.c (directive_get_options, type_get_child_list): * giscanner/scannerlexer.l (parse_gtkdoc): * giscanner/scannerparser.y (ctype_free): * giscanner/sourcescanner.c: * giscanner/sourcescanner.h (gi_source_scanner_parse_macros): * tests/types/gitesttypes.c: * tools/compiler.c (main): * tools/generate.c (write_repository): Remove unused variables and code, add missing includes, declarations and case statements. svn path=/trunk/; revision=730
This commit is contained in:
committed by
Tommi Komulainen
parent
e8c772bdb6
commit
4fb5b001bb
23
girnode.c
23
girnode.c
@@ -34,7 +34,7 @@ static gulong types_count = 0;
|
||||
static gulong unique_types_count = 0;
|
||||
|
||||
void
|
||||
init_stats (void)
|
||||
_g_irnode_init_stats (void)
|
||||
{
|
||||
string_count = 0;
|
||||
unique_string_count = 0;
|
||||
@@ -45,7 +45,7 @@ init_stats (void)
|
||||
}
|
||||
|
||||
void
|
||||
dump_stats (void)
|
||||
_g_irnode_dump_stats (void)
|
||||
{
|
||||
g_message ("%lu strings (%lu before sharing), %lu bytes (%lu before sharing)",
|
||||
unique_string_count, string_count, unique_string_size, string_size);
|
||||
@@ -870,6 +870,25 @@ g_ir_node_can_have_member (GIrNode *node)
|
||||
case G_IR_NODE_STRUCT:
|
||||
case G_IR_NODE_UNION:
|
||||
return TRUE;
|
||||
/* list others individually rather than with default: so that compiler
|
||||
* warns if new node types are added without adding them to the switch
|
||||
*/
|
||||
case G_IR_NODE_INVALID:
|
||||
case G_IR_NODE_FUNCTION:
|
||||
case G_IR_NODE_CALLBACK:
|
||||
case G_IR_NODE_ENUM:
|
||||
case G_IR_NODE_FLAGS:
|
||||
case G_IR_NODE_CONSTANT:
|
||||
case G_IR_NODE_ERROR_DOMAIN:
|
||||
case G_IR_NODE_PARAM:
|
||||
case G_IR_NODE_TYPE:
|
||||
case G_IR_NODE_PROPERTY:
|
||||
case G_IR_NODE_SIGNAL:
|
||||
case G_IR_NODE_VALUE:
|
||||
case G_IR_NODE_VFUNC:
|
||||
case G_IR_NODE_FIELD:
|
||||
case G_IR_NODE_XREF:
|
||||
return FALSE;
|
||||
};
|
||||
return FALSE;
|
||||
}
|
||||
|
Reference in New Issue
Block a user