summaryrefslogtreecommitdiff
path: root/gobject-introspection
diff options
context:
space:
mode:
authorJuerg Billeter <j@bitron.ch>2007-10-19 15:47:02 +0000
committerJürg Billeter <juergbi@src.gnome.org>2007-10-19 15:47:02 +0000
commit2f09eebafae54d18cc599e7b73137caddc63ede6 (patch)
tree21ba9b91769c23e9fff811c13b2553b05d5e72cb /gobject-introspection
parentaf1b9b36e854f1ac7e1048e67c49d55621057b57 (diff)
downloadvala-2f09eebafae54d18cc599e7b73137caddc63ede6.tar.gz
update from gobject-introspection SVN
2007-10-19 Juerg Billeter <j@bitron.ch> * gobject-introspection/gidlnode.c, gobject-introspection/gidlparser.c: update from gobject-introspection SVN svn path=/trunk/; revision=659
Diffstat (limited to 'gobject-introspection')
-rw-r--r--gobject-introspection/gidlnode.c29
-rw-r--r--gobject-introspection/gidlparser.c14
2 files changed, 25 insertions, 18 deletions
diff --git a/gobject-introspection/gidlnode.c b/gobject-introspection/gidlnode.c
index bbde2a005..92ce1958c 100644
--- a/gobject-introspection/gidlnode.c
+++ b/gobject-introspection/gidlnode.c
@@ -19,6 +19,7 @@
*/
#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
#include "gidlmodule.h"
@@ -46,9 +47,9 @@ init_stats (void)
void
dump_stats (void)
{
- g_message ("%d strings (%d before sharing), %d bytes (%d before sharing)",
+ g_message ("%lu strings (%lu before sharing), %lu bytes (%lu before sharing)",
unique_string_count, string_count, unique_string_size, string_size);
- g_message ("%d types (%d before sharing)", unique_types_count, types_count);
+ g_message ("%lu types (%lu before sharing)", unique_types_count, types_count);
}
#define ALIGN_VALUE(this, boundary) \
@@ -63,6 +64,7 @@ g_idl_node_new (GIdlNodeTypeId type)
switch (type)
{
case G_IDL_NODE_FUNCTION:
+ case G_IDL_NODE_CALLBACK:
node = g_malloc0 (sizeof (GIdlNodeFunction));
break;
@@ -251,8 +253,6 @@ g_idl_node_free (GIdlNode *node)
case G_IDL_NODE_VALUE:
{
- GIdlNodeValue *value = (GIdlNodeValue *)node;
-
g_free (node->name);
}
break;
@@ -479,7 +479,7 @@ g_idl_node_get_size (GIdlNode *node)
size = 0;
}
- g_debug ("node %d type %d size %d", node, node->type, size);
+ g_debug ("node %p type %d size %d", node, node->type, size);
return size;
}
@@ -633,8 +633,6 @@ g_idl_node_get_full_size (GIdlNode *node)
case G_IDL_NODE_VALUE:
{
- GIdlNodeValue *value = (GIdlNodeValue *)node;
-
size = 12;
size += ALIGN_VALUE (strlen (node->name) + 1, 4);
}
@@ -761,7 +759,7 @@ g_idl_node_get_full_size (GIdlNode *node)
size = 0;
}
- g_debug ("node %d type %d full size %d", node, node->type, size);
+ g_debug ("node %p type %d full size %d", node, node->type, size);
return size;
}
@@ -1129,7 +1127,7 @@ g_idl_node_build_metadata (GIdlNode *node,
case TYPE_TAG_ERROR:
{
ErrorTypeBlob *blob = (ErrorTypeBlob *)&data[*offset2];
- gint i, domain;
+ gint i;
blob->pointer = 1;
blob->reserved = 0;
@@ -1201,7 +1199,7 @@ g_idl_node_build_metadata (GIdlNode *node,
FunctionBlob *blob = (FunctionBlob *)&data[*offset];
SignatureBlob *blob2 = (SignatureBlob *)&data[*offset2];
GIdlNodeFunction *function = (GIdlNodeFunction *)node;
- guint32 signature, res;
+ guint32 signature;
gint n;
signature = *offset2;
@@ -1250,7 +1248,7 @@ g_idl_node_build_metadata (GIdlNode *node,
CallbackBlob *blob = (CallbackBlob *)&data[*offset];
SignatureBlob *blob2 = (SignatureBlob *)&data[*offset2];
GIdlNodeFunction *function = (GIdlNodeFunction *)node;
- guint32 signature, res;
+ guint32 signature;
gint n;
signature = *offset2;
@@ -1293,7 +1291,7 @@ g_idl_node_build_metadata (GIdlNode *node,
SignalBlob *blob = (SignalBlob *)&data[*offset];
SignatureBlob *blob2 = (SignatureBlob *)&data[*offset2];
GIdlNodeSignal *signal = (GIdlNodeSignal *)node;
- guint32 signature, res;
+ guint32 signature;
gint n;
signature = *offset2;
@@ -1344,7 +1342,7 @@ g_idl_node_build_metadata (GIdlNode *node,
VFuncBlob *blob = (VFuncBlob *)&data[*offset];
SignatureBlob *blob2 = (SignatureBlob *)&data[*offset2];
GIdlNodeVFunc *vfunc = (GIdlNodeVFunc *)node;
- guint32 signature, res;
+ guint32 signature;
gint n;
signature = *offset2;
@@ -1390,7 +1388,6 @@ g_idl_node_build_metadata (GIdlNode *node,
{
ArgBlob *blob = (ArgBlob *)&data[*offset];
GIdlNodeParam *param = (GIdlNodeParam *)node;
- guint32 res;
*offset += 8;
@@ -1414,7 +1411,6 @@ g_idl_node_build_metadata (GIdlNode *node,
{
StructBlob *blob = (StructBlob *)&data[*offset];
GIdlNodeStruct *struct_ = (GIdlNodeStruct *)node;
- guint32 pos;
blob->blob_type = BLOB_TYPE_STRUCT;
blob->deprecated = struct_->deprecated;
@@ -1624,7 +1620,6 @@ g_idl_node_build_metadata (GIdlNode *node,
{
ObjectBlob *blob = (ObjectBlob *)&data[*offset];
GIdlNodeInterface *object = (GIdlNodeInterface *)node;
- gint parent;
blob->blob_type = BLOB_TYPE_OBJECT;
blob->deprecated = object->deprecated;
@@ -1947,6 +1942,8 @@ g_idl_node_build_metadata (GIdlNode *node,
strings, types, data, &pos, offset2);
}
break;
+ default:
+ g_assert_not_reached ();
}
g_debug ("node %p type %d, offset %d -> %d, offset2 %d -> %d",
diff --git a/gobject-introspection/gidlparser.c b/gobject-introspection/gidlparser.c
index adc0723b3..150861708 100644
--- a/gobject-introspection/gidlparser.c
+++ b/gobject-introspection/gidlparser.c
@@ -17,6 +17,8 @@
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
+
+#include <stdlib.h>
#include <string.h>
#include <glib.h>
@@ -522,6 +524,8 @@ start_function (GMarkupParseContext *context,
union_->members = g_list_append (union_->members, function);
}
break;
+ default:
+ g_assert_not_reached ();
}
ctx->current_node = (GIdlNode *)function;
@@ -655,6 +659,8 @@ start_parameter (GMarkupParseContext *context,
vfunc->parameters = g_list_append (vfunc->parameters, param);
}
break;
+ default:
+ g_assert_not_reached ();
}
}
@@ -772,6 +778,8 @@ start_field (GMarkupParseContext *context,
}
}
break;
+ default:
+ g_assert_not_reached ();
}
}
return TRUE;
@@ -1265,6 +1273,8 @@ start_return_type (GMarkupParseContext *context,
vfunc->result = param;
}
break;
+ default:
+ g_assert_not_reached ();
}
}
@@ -1570,7 +1580,7 @@ start_element_handler (GMarkupParseContext *context,
GError **error)
{
ParseContext *ctx = user_data;
- gint i, line_number, char_number;
+ gint line_number, char_number;
switch (element_name[0])
{
@@ -1853,7 +1863,7 @@ end_element_handler (GMarkupParseContext *context,
case STATE_NAMESPACE:
if (strcmp (element_name, "namespace") == 0)
- {
+ {
ctx->current_module = NULL;
ctx->state = STATE_ROOT;
}