Suppress some unused variable warnings in libmspack.
Change-Id: Iccc98cf2092a5a0101021e24b051c42743b9becf
This commit is contained in:
parent
6bff0f779f
commit
3c6f3945dd
2 changed files with 4 additions and 0 deletions
|
@ -524,6 +524,7 @@ static char *cabd_read_string(struct mspack_system *sys,
|
||||||
off_t base = sys->tell(fh);
|
off_t base = sys->tell(fh);
|
||||||
char buf[256], *str;
|
char buf[256], *str;
|
||||||
unsigned int len, i, ok;
|
unsigned int len, i, ok;
|
||||||
|
(void)cab;
|
||||||
|
|
||||||
/* read up to 256 bytes */
|
/* read up to 256 bytes */
|
||||||
len = sys->read(fh, &buf[0], 256);
|
len = sys->read(fh, &buf[0], 256);
|
||||||
|
|
|
@ -115,6 +115,7 @@ static struct mspack_file *msp_open(struct mspack_system *self,
|
||||||
{
|
{
|
||||||
struct mspack_file_p *fh;
|
struct mspack_file_p *fh;
|
||||||
const char *fmode;
|
const char *fmode;
|
||||||
|
(void)self;
|
||||||
|
|
||||||
switch (mode) {
|
switch (mode) {
|
||||||
case MSPACK_SYS_OPEN_READ: fmode = "rb"; break;
|
case MSPACK_SYS_OPEN_READ: fmode = "rb"; break;
|
||||||
|
@ -199,10 +200,12 @@ static void *msp_alloc(struct mspack_system *self, size_t bytes) {
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
/* make uninitialised data obvious */
|
/* make uninitialised data obvious */
|
||||||
char *buf = malloc(bytes + 8);
|
char *buf = malloc(bytes + 8);
|
||||||
|
(void)self;
|
||||||
if (buf) memset(buf, 0xDC, bytes);
|
if (buf) memset(buf, 0xDC, bytes);
|
||||||
*((size_t *)buf) = bytes;
|
*((size_t *)buf) = bytes;
|
||||||
return &buf[8];
|
return &buf[8];
|
||||||
#else
|
#else
|
||||||
|
(void)self;
|
||||||
return malloc(bytes);
|
return malloc(bytes);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue