Changeset 4740


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
Location:
gaycko/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • gaycko/trunk/configure.ac

    r4724 r4740  
    8888V8_INCLUDES="-I${V8}/include"
    8989V8_LIBS="-L${V8}/ -lv8_g"
    90 CFLAGS="${CFLAGS} -Wall -Wpointer-arith -Wcast-align -Wcast-qual -Wstrict-prototypes -Wshadow -Waggregate-return -Wmissing-prototypes -Wnested-externs -Wsign-compare -std=c99 -O0 -g -ggdb"
     90CFLAGS="${CFLAGS} -Wall -Wpointer-arith -Wcast-align -Wcast-qual -Wstrict-prototypes -Wshadow -Waggregate-return -Wmissing-prototypes -Wnested-externs -Wsign-compare -std=c99 -D_GNU_SOURCE -O0 -g -ggdb"
    9191
    9292
  • 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); 
  • gaycko/trunk/src/parsing/parse.h

    r4734 r4740  
    11#ifndef PARSE_H
    22#define PARSE_H
    3 
    4 #ifndef __APPLE__
    5 #ifndef uint
    6 #define uint unsigned int
    7 #define ulong unsigned long
    8 #endif
    9 #endif
    103
    114#include <stdint.h>
Note: See TracChangeset for help on using the changeset viewer.