--- embedaddon/miniupnpd/testupnpdescgen.c 2012/05/29 12:55:57 1.1.1.2 +++ embedaddon/miniupnpd/testupnpdescgen.c 2013/07/22 00:32:35 1.1.1.3 @@ -1,7 +1,7 @@ -/* $Id: testupnpdescgen.c,v 1.1.1.2 2012/05/29 12:55:57 misho Exp $ */ +/* $Id: testupnpdescgen.c,v 1.1.1.3 2013/07/22 00:32:35 misho Exp $ */ /* MiniUPnP project * http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/ - * (c) 2006-2011 Thomas Bernard + * (c) 2006-2012 Thomas Bernard * This software is subject to the conditions detailed * in the LICENCE file provided within the distribution */ @@ -13,6 +13,7 @@ #include #include +#include "macros.h" #include "config.h" #include "upnpdescgen.h" @@ -21,6 +22,7 @@ char serialnumber[] = "12345678"; char modelnumber[] = "1"; char presentationurl[] = "http://192.168.0.1:8080/"; /*char presentationurl[] = "";*/ +char friendly_name[] = OS_NAME " router"; char * use_ext_ip_addr = NULL; const char * ext_if_name = "eth0"; @@ -32,6 +34,7 @@ int ipv6fc_inbound_pinhole_allowed = 1; int getifaddr(const char * ifname, char * buf, int len) { + UNUSED(ifname); strncpy(buf, "1.2.3.4", len); return 0; } @@ -43,6 +46,7 @@ int upnp_get_portmapping_number_of_entries(void) int get_wan_connection_status(const char * ifname) { + UNUSED(ifname); return 2; } @@ -53,6 +57,7 @@ xml_pretty_print(const char * s, int len, FILE * f) int n = 0, i; int elt_close = 0; int c, indent = 0; + if(!s) return n; while(len > 0) @@ -83,7 +88,7 @@ xml_pretty_print(const char * s, int len, FILE * f) if(elt_close==1) { /*fputc('\n', f); n++; */ - //elt_close = 0; + /* elt_close = 0; */ if(indent > 0) indent--; } @@ -120,6 +125,8 @@ main(int argc, char * * argv) char * s; int l; FILE * f; + UNUSED(argc); + UNUSED(argv); if(mkdir("testdescs", 0777) < 0) { if(errno != EEXIST) {