From 4d6ca0e17d04f9fc9f53c1c6656659b0552f368a Mon Sep 17 00:00:00 2001 From: Dirk Meyer Date: Sat, 11 Feb 2017 08:00:51 +0000 Subject: - fix C warnings - split patches - make portlint happier --- archivers/lha/files/patch-crcio.c | 53 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 archivers/lha/files/patch-crcio.c (limited to 'archivers/lha/files/patch-crcio.c') diff --git a/archivers/lha/files/patch-crcio.c b/archivers/lha/files/patch-crcio.c new file mode 100644 index 000000000000..6d1866c2de8a --- /dev/null +++ b/archivers/lha/files/patch-crcio.c @@ -0,0 +1,53 @@ +--- src/crcio.c.orig 2000-10-04 14:57:38 UTC ++++ src/crcio.c +@@ -66,8 +66,7 @@ calccrc(p, n) + + /* ------------------------------------------------------------------------ */ + void +-fillbuf(n) /* Shift bitbuf n bits left, read n bits */ +- unsigned char n; ++fillbuf(unsigned char n) /* Shift bitbuf n bits left, read n bits */ + { + while (n > bitcount) { + n -= bitcount; +@@ -87,8 +86,7 @@ fillbuf(n) /* Shift bitbuf n bits left + + /* ------------------------------------------------------------------------ */ + unsigned short +-getbits(n) +- unsigned char n; ++getbits(unsigned char n) + { + unsigned short x; + +@@ -99,9 +97,7 @@ getbits(n) + + /* ------------------------------------------------------------------------ */ + void +-putcode(n, x) /* Write rightmost n bits of x */ +- unsigned char n; +- unsigned short x; ++putcode(unsigned char n, unsigned short x) /* Write rightmost n bits of x */ + { + while (n >= bitcount) { + n -= bitcount; +@@ -126,9 +122,7 @@ putcode(n, x) /* Write rightmost n bit + + /* ------------------------------------------------------------------------ */ + void +-putbits(n, x) /* Write rightmost n bits of x */ +- unsigned char n; +- unsigned short x; ++putbits(unsigned char n, unsigned short x) /* Write rightmost n bits of x */ + { + x <<= USHRT_BIT - n; + while (n >= bitcount) { +@@ -308,7 +302,7 @@ fread_txt(p, n, fp) + c = '\r'; + } + #ifdef EUC +- else if (euc_mode && (c == 0x8E || 0xA0 < c && c < 0xFF)) { ++ else if (euc_mode && (c == 0x8E || (0xA0 < c && c < 0xFF))) { + int d = fgetc(fp); + if (d == EOF) { + *p++ = c; -- cgit v1.2.3