From f92bd64966291dc3c7968d6a1dd7a11f06ba80b3 Mon Sep 17 00:00:00 2001 From: Anders Broman Date: Wed, 20 Mar 2013 05:59:22 +0000 Subject: [-Wmissing-prototypes] Use explicit casts. svn path=/trunk/; revision=48439 --- plugins/wimaxasncp/wimaxasncp_dict.l | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'plugins/wimaxasncp') diff --git a/plugins/wimaxasncp/wimaxasncp_dict.l b/plugins/wimaxasncp/wimaxasncp_dict.l index b4c273368b..a643275453 100644 --- a/plugins/wimaxasncp/wimaxasncp_dict.l +++ b/plugins/wimaxasncp/wimaxasncp_dict.l @@ -195,7 +195,7 @@ since_attr since=\042 {xmlpi_start} BEGIN LOADING_XMLPI; {whitespace} ; {entityname} { - xmlpi = g_malloc(sizeof(wimaxasncp_dict_xmlpi_t)); + xmlpi = g_new(wimaxasncp_dict_xmlpi_t,1); xmlpi->name = g_strdup(yytext); xmlpi->key = NULL; xmlpi->value = NULL; @@ -219,7 +219,7 @@ since_attr since=\042 {start_entity} BEGIN ENTITY; {entityname} { - entity_t *e = g_malloc(sizeof(entity_t)); + entity_t *e = g_new(entity_t,1); D(("ENTITY: %s\n",yytext)); e->name = g_strdup(yytext); e->next = ents.next; @@ -385,7 +385,7 @@ since_attr since=\042 {tlv_start} { D(("tlv_start\n")); - tlv = g_malloc(sizeof(wimaxasncp_dict_tlv_t)); + tlv = g_new(wimaxasncp_dict_tlv_t,1); tlv->type = 0; tlv->name = NULL; tlv->description = NULL; @@ -425,7 +425,7 @@ since_attr since=\042 {enum_start} { D(("enum_start\n")); - enumitem = g_malloc(sizeof(wimaxasncp_dict_enum_t)); + enumitem = g_new(wimaxasncp_dict_enum_t,1); enumitem->name = NULL; enumitem->code = 0; enumitem->next = NULL; @@ -539,11 +539,11 @@ void wimaxasncp_dict_unused(void) { static void append_to_buffer(const gchar *txt, int len) { if (strbuf == NULL) { - read_ptr = write_ptr = strbuf = g_malloc(size_strbuf); + read_ptr = write_ptr = strbuf = (gchar *)g_malloc(size_strbuf); } if ( (len_strbuf + len + 1) >= size_strbuf ) { - read_ptr = strbuf = g_realloc(strbuf,size_strbuf *= 2); + read_ptr = strbuf = (gchar *)g_realloc(strbuf,size_strbuf *= 2); } write_ptr = strbuf + len_strbuf; @@ -626,7 +626,7 @@ wimaxasncp_dict_t *wimaxasncp_dict_scan( wimaxasncp_dict_free(dict); } - dict = g_malloc(sizeof(wimaxasncp_dict_t)); + dict = g_new(wimaxasncp_dict_t,1); dict->tlvs = NULL; dict->xmlpis = NULL; -- cgit v1.2.3