*/
#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
#include "gidlmodule.h"
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) \
switch (type)
{
case G_IDL_NODE_FUNCTION:
+ case G_IDL_NODE_CALLBACK:
node = g_malloc0 (sizeof (GIdlNodeFunction));
break;
case G_IDL_NODE_VALUE:
{
- GIdlNodeValue *value = (GIdlNodeValue *)node;
-
g_free (node->name);
}
break;
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;
}
case G_IDL_NODE_VALUE:
{
- GIdlNodeValue *value = (GIdlNodeValue *)node;
-
size = 12;
size += ALIGN_VALUE (strlen (node->name) + 1, 4);
}
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;
}
case TYPE_TAG_ERROR:
{
ErrorTypeBlob *blob = (ErrorTypeBlob *)&data[*offset2];
- gint i, domain;
+ gint i;
blob->pointer = 1;
blob->reserved = 0;
FunctionBlob *blob = (FunctionBlob *)&data[*offset];
SignatureBlob *blob2 = (SignatureBlob *)&data[*offset2];
GIdlNodeFunction *function = (GIdlNodeFunction *)node;
- guint32 signature, res;
+ guint32 signature;
gint n;
signature = *offset2;
CallbackBlob *blob = (CallbackBlob *)&data[*offset];
SignatureBlob *blob2 = (SignatureBlob *)&data[*offset2];
GIdlNodeFunction *function = (GIdlNodeFunction *)node;
- guint32 signature, res;
+ guint32 signature;
gint n;
signature = *offset2;
SignalBlob *blob = (SignalBlob *)&data[*offset];
SignatureBlob *blob2 = (SignatureBlob *)&data[*offset2];
GIdlNodeSignal *signal = (GIdlNodeSignal *)node;
- guint32 signature, res;
+ guint32 signature;
gint n;
signature = *offset2;
VFuncBlob *blob = (VFuncBlob *)&data[*offset];
SignatureBlob *blob2 = (SignatureBlob *)&data[*offset2];
GIdlNodeVFunc *vfunc = (GIdlNodeVFunc *)node;
- guint32 signature, res;
+ guint32 signature;
gint n;
signature = *offset2;
{
ArgBlob *blob = (ArgBlob *)&data[*offset];
GIdlNodeParam *param = (GIdlNodeParam *)node;
- guint32 res;
*offset += 8;
{
StructBlob *blob = (StructBlob *)&data[*offset];
GIdlNodeStruct *struct_ = (GIdlNodeStruct *)node;
- guint32 pos;
blob->blob_type = BLOB_TYPE_STRUCT;
blob->deprecated = struct_->deprecated;
{
ObjectBlob *blob = (ObjectBlob *)&data[*offset];
GIdlNodeInterface *object = (GIdlNodeInterface *)node;
- gint parent;
blob->blob_type = BLOB_TYPE_OBJECT;
blob->deprecated = object->deprecated;
strings, types, data, &pos, offset2);
}
break;
+ default:
+ g_assert_not_reached ();
}
g_debug ("node %p type %d, offset %d -> %d, offset2 %d -> %d",
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
+
+#include <stdlib.h>
#include <string.h>
#include <glib.h>
union_->members = g_list_append (union_->members, function);
}
break;
+ default:
+ g_assert_not_reached ();
}
ctx->current_node = (GIdlNode *)function;
vfunc->parameters = g_list_append (vfunc->parameters, param);
}
break;
+ default:
+ g_assert_not_reached ();
}
}
}
}
break;
+ default:
+ g_assert_not_reached ();
}
}
return TRUE;
vfunc->result = param;
}
break;
+ default:
+ g_assert_not_reached ();
}
}
GError **error)
{
ParseContext *ctx = user_data;
- gint i, line_number, char_number;
+ gint line_number, char_number;
switch (element_name[0])
{
case STATE_NAMESPACE:
if (strcmp (element_name, "namespace") == 0)
- {
+ {
ctx->current_module = NULL;
ctx->state = STATE_ROOT;
}