Ignore:
Timestamp:
Feb 2, 2011, 11:09:54 AM (10 years ago)
Author:
Jean-Yves Lamoureux
Message:
  • Use GNU_SOURCE to ensure availability of strdup&co
  • Fix signedness warnings
File:
1 edited

Legend:

Unmodified
Added
Removed
  • gaycko/trunk/src/dom/dom.c

    r4739 r4740  
     1#include <config.h>
    12#include <stdio.h>
    23#include <string.h>
     
    7778                for(xmlAttrPtr attr = node->properties; attr != NULL; attr = attr->next) {
    7879                        e->attributes = realloc(e->attributes, sizeof(gAttribute));
    79                         e->attributes[e->attribute_count].name = strdup(attr->name);
    80                         e->attributes[e->attribute_count].value = strdup(attr->children->content);
     80                        e->attributes[e->attribute_count].name = strdup((const char*)attr->name);
     81                        e->attributes[e->attribute_count].value = strdup((char*)attr->children->content);
    8182            e->attribute_count++;
    8283                }
     
    137138        } else {
    138139                LEVEL printf("<%s", elem->name);
    139         int a;
     140        unsigned int a;
    140141        for(a = 0; a < elem->attribute_count; a++) {
    141142                printf(" %s=\"%s\"", elem->attributes[a].name, elem->attributes[a].value); 
Note: See TracChangeset for help on using the changeset viewer.