miniupnpd: fix warnings when compiling with IGD_V2 disabled
fixes #617 ./upnpdescgen.c:946:1: warning: unused label 'unstack' [-Wunused-label] unstack: ^~~~~~~~ ./upnpdescgen.c:891:12: warning: unused parameter 'force_igd1' [-Wunused-parameter] int force_igd1) ^ ./upnpdescgen.c:1035:61: warning: unused parameter 'force_igd1' [-Wunused-parameter] genServiceDesc(int * len, const struct serviceDesc * s, int force_igd1) ^ 3 warnings generated.
This commit is contained in:
parent
df04310d39
commit
3a2b15af4c
|
@ -900,6 +900,10 @@ genXML(char * str, int * len, int * tmplen,
|
|||
unsigned short j;
|
||||
const char * eltname;
|
||||
} pile[GENXML_STACK_SIZE]; /* stack */
|
||||
#if !defined(IGD_V2)
|
||||
UNUSED(force_igd1);
|
||||
#endif
|
||||
|
||||
top = -1;
|
||||
i = 0; /* current node */
|
||||
j = 1; /* i + number of nodes*/
|
||||
|
@ -943,7 +947,9 @@ genXML(char * str, int * len, int * tmplen,
|
|||
str = strcat_str(str, len, tmplen, eltname);
|
||||
str = strcat_char(str, len, tmplen, '>');
|
||||
}
|
||||
#ifdef IGD_V2
|
||||
unstack:
|
||||
#endif
|
||||
for(;;)
|
||||
{
|
||||
if(top < 0)
|
||||
|
@ -1040,6 +1046,10 @@ genServiceDesc(int * len, const struct serviceDesc * s, int force_igd1)
|
|||
const struct argument * args;
|
||||
char * str;
|
||||
int tmplen;
|
||||
#if !defined(IGD_V2)
|
||||
UNUSED(force_igd1);
|
||||
#endif
|
||||
|
||||
tmplen = 2048;
|
||||
str = (char *)malloc(tmplen);
|
||||
if(str == NULL)
|
||||
|
|
Loading…
Reference in New Issue