Package: soundmodem Version: 0.9-1 Severity: serious Tags: patch soundmodem fails to build because it contains jumps into statement expressions:
> if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include/gnome-xml -I../matlib > -I../libmisc -I../directx/include -I../directx/include/directx6 -g -O2 > -Wall -O2 -MT kisspkt.o -MD -MP -MF ".deps/kisspkt.Tpo" \ > -c -o kisspkt.o `test -f 'kisspkt.c' || echo './'`kisspkt.c; \ > then mv -f ".deps/kisspkt.Tpo" ".deps/kisspkt.Po"; \ > else rm -f ".deps/kisspkt.Tpo"; exit 1; \ > fi > kisspkt.c: In function 'hdlc_encode': > kisspkt.c:221: error: jump into statement expression > kisspkt.c:230: error: jump into statement expression > kisspkt.c:222: error: jump into statement expression > kisspkt.c:231: error: jump into statement expression > kisspkt.c:223: error: jump into statement expression > kisspkt.c:232: error: jump into statement expression > kisspkt.c:224: error: jump into statement expression > kisspkt.c:233: error: jump into statement expression > kisspkt.c:225: error: jump into statement expression > kisspkt.c:234: error: jump into statement expression > kisspkt.c:226: error: jump into statement expression > kisspkt.c:235: error: jump into statement expression > kisspkt.c:227: error: jump into statement expression > kisspkt.c:236: error: jump into statement expression > kisspkt.c:228: error: jump into statement expression > kisspkt.c:237: error: jump into statement expression > kisspkt.c:237: warning: label 'encodeend7' defined but not used > kisspkt.c:236: warning: label 'encodeend6' defined but not used > kisspkt.c:235: warning: label 'encodeend5' defined but not used > kisspkt.c:234: warning: label 'encodeend4' defined but not used > kisspkt.c:233: warning: label 'encodeend3' defined but not used > kisspkt.c:232: warning: label 'encodeend2' defined but not used > kisspkt.c:231: warning: label 'encodeend1' defined but not used > kisspkt.c:230: warning: label 'encodeend0' defined but not used > kisspkt.c: In function 'hdlc_receive': > kisspkt.c:360: error: jump into statement expression > kisspkt.c:369: error: jump into statement expression > kisspkt.c:369: error: jump into statement expression > kisspkt.c:369: error: jump into statement expression > kisspkt.c:360: error: jump into statement expression > kisspkt.c:369: error: jump into statement expression > kisspkt.c:361: error: jump into statement expression > kisspkt.c:370: error: jump into statement expression > kisspkt.c:370: error: jump into statement expression > kisspkt.c:370: error: jump into statement expression > kisspkt.c:361: error: jump into statement expression > kisspkt.c:370: error: jump into statement expression > kisspkt.c:362: error: jump into statement expression > kisspkt.c:371: error: jump into statement expression > kisspkt.c:371: error: jump into statement expression > kisspkt.c:371: error: jump into statement expression > kisspkt.c:362: error: jump into statement expression > kisspkt.c:371: error: jump into statement expression > kisspkt.c:363: error: jump into statement expression > kisspkt.c:372: error: jump into statement expression > kisspkt.c:372: error: jump into statement expression > kisspkt.c:372: error: jump into statement expression > kisspkt.c:363: error: jump into statement expression > kisspkt.c:372: error: jump into statement expression > kisspkt.c:364: error: jump into statement expression > kisspkt.c:373: error: jump into statement expression > kisspkt.c:373: error: jump into statement expression > kisspkt.c:373: error: jump into statement expression > kisspkt.c:364: error: jump into statement expression > kisspkt.c:373: error: jump into statement expression > kisspkt.c:365: error: jump into statement expression > kisspkt.c:374: error: jump into statement expression > kisspkt.c:374: error: jump into statement expression > kisspkt.c:374: error: jump into statement expression > kisspkt.c:365: error: jump into statement expression > kisspkt.c:374: error: jump into statement expression > kisspkt.c:366: error: jump into statement expression > kisspkt.c:375: error: jump into statement expression > kisspkt.c:375: error: jump into statement expression > kisspkt.c:375: error: jump into statement expression > kisspkt.c:366: error: jump into statement expression > kisspkt.c:375: error: jump into statement expression > kisspkt.c:367: error: jump into statement expression > kisspkt.c:376: error: jump into statement expression > kisspkt.c:376: error: jump into statement expression > kisspkt.c:376: error: jump into statement expression > kisspkt.c:367: error: jump into statement expression > kisspkt.c:376: error: jump into statement expression > kisspkt.c:376: warning: label 'enditer7' defined but not used > kisspkt.c:375: warning: label 'enditer6' defined but not used > kisspkt.c:374: warning: label 'enditer5' defined but not used > kisspkt.c:373: warning: label 'enditer4' defined but not used > kisspkt.c:372: warning: label 'enditer3' defined but not used > kisspkt.c:371: warning: label 'enditer2' defined but not used > kisspkt.c:370: warning: label 'enditer1' defined but not used > kisspkt.c:369: warning: label 'enditer0' defined but not used > kisspkt.c: In function 'kiss_input': > kisspkt.c:498: warning: pointer targets in assignment differ in signedness > kisspkt.c:507: warning: pointer targets in passing argument 2 of > 'kiss_decode' differ in signedness > kisspkt.c: In function 'p3dreceive': > kisspkt.c:590: warning: unused variable 'i' The attached patch converts the statement expressions to statements, which fixes this problem. -- Matt
--- soundmodem-0.9.orig/soundcard/kisspkt.c +++ soundmodem-0.9/soundcard/kisspkt.c @@ -177,14 +177,14 @@ */ #define ENCODEITERA(j) \ -({ \ +do { \ if (!(notbitstream & (0x1f0 << j))) \ goto stuff##j; \ encodeend##j:; \ -}) +} while (0) #define ENCODEITERB(j) \ -({ \ +do { \ stuff##j: \ bitstream &= ~(0x100 << j); \ bitbuf = (bitbuf & (((2 << j) << numbit) - 1)) | \ @@ -192,7 +192,7 @@ numbit++; \ notbitstream = ~bitstream; \ goto encodeend##j; \ -}) +} while (0) static void hdlc_encode(struct modemchannel *chan, unsigned char *pkt, unsigned int len) { @@ -309,16 +309,16 @@ } #define DECODEITERA(j) \ -({ \ +do { \ if (!(notbitstream & (0x0fc << j))) /* flag or abort */ \ goto flgabrt##j; \ if ((bitstream & (0x1f8 << j)) == (0xf8 << j)) /* stuffed bit */ \ goto stuff##j; \ enditer##j:; \ -}) +} while (0) #define DECODEITERB(j) \ -({ \ +do { \ flgabrt##j: \ if (!(notbitstream & (0x1fc << j))) { /* abort received */ \ state = 0; \ @@ -337,7 +337,7 @@ numbits--; \ bitbuf = (bitbuf & ((~0xff) << j)) | ((bitbuf & ~((~0xff) << j)) << 1); \ goto enditer##j; \ -}) +} while (0) static inline void hdlc_receive(struct modemchannel *chan, const unsigned char *data, unsigned nrbytes) { only in patch2: unchanged: --- soundmodem-0.9.orig/configapp/src/diag.c +++ soundmodem-0.9/configapp/src/diag.c @@ -208,16 +208,16 @@ } #define DECODEITERA(j) \ -({ \ +do { \ if (!(notbitstream & (0x0fc << j))) /* flag or abort */ \ goto flgabrt##j; \ if ((bitstream & (0x1f8 << j)) == (0xf8 << j)) /* stuffed bit */ \ goto stuff##j; \ enditer##j:; \ -}) +} while (0) #define DECODEITERB(j) \ -({ \ +do { \ flgabrt##j: \ if (!(notbitstream & (0x1fc << j))) { /* abort received */ \ state = 0; \ @@ -236,7 +236,7 @@ numbits--; \ bitbuf = (bitbuf & ((~0xff) << j)) | ((bitbuf & ~((~0xff) << j)) << 1); \ goto enditer##j; \ -}) +} while (0) static inline void hdlc_receive(const unsigned char *data, unsigned nrbytes) {
signature.asc
Description: Digital signature