diff options
author | Patrik Nyblom <[email protected]> | 2011-11-11 15:58:42 +0100 |
---|---|---|
committer | Patrik Nyblom <[email protected]> | 2011-11-16 17:09:35 +0100 |
commit | 08d4822dd22465da4a452484780b285a93192fce (patch) | |
tree | 362e8a8326e29da7ff211e2bd415bebf46eb8b58 /erts/emulator/drivers/common | |
parent | 95d12d7a893fd940253b62906e12e027a18e126a (diff) | |
download | otp-08d4822dd22465da4a452484780b285a93192fce.tar.gz otp-08d4822dd22465da4a452484780b285a93192fce.tar.bz2 otp-08d4822dd22465da4a452484780b285a93192fce.zip |
Remove remaining gcc 4.6 assigned-but-not-used warnings from erts
Diffstat (limited to 'erts/emulator/drivers/common')
-rw-r--r-- | erts/emulator/drivers/common/efile_drv.c | 16 | ||||
-rw-r--r-- | erts/emulator/drivers/common/inet_drv.c | 5 |
2 files changed, 15 insertions, 6 deletions
diff --git a/erts/emulator/drivers/common/efile_drv.c b/erts/emulator/drivers/common/efile_drv.c index 52f1b5312b..901d98c09d 100644 --- a/erts/emulator/drivers/common/efile_drv.c +++ b/erts/emulator/drivers/common/efile_drv.c @@ -2472,16 +2472,22 @@ file_output(ErlDrvData e, char* buf, int count) static void file_flush(ErlDrvData e) { file_descriptor *desc = (file_descriptor *)e; +#ifdef DEBUG int r; +#endif TRACE_C('f'); - r = flush_write(desc, NULL); +#ifdef DEBUG + r = +#endif + flush_write(desc, NULL); /* Only possible reason for bad return value is ENOMEM, and * there is nobody to tell... */ +#ifdef DEBUG ASSERT(r == 0); - r = 0; /* Avoiding warning */ +#endif cq_execute(desc); } @@ -2531,12 +2537,14 @@ file_timeout(ErlDrvData e) { driver_async(desc->port, KEY(desc), desc->invoke, desc->d, desc->free); break; case timer_write: { - int r = flush_write(desc, NULL); +#ifdef DEBUG + int r = +#endif + flush_write(desc, NULL); /* Only possible reason for bad return value is ENOMEM, and * there is nobody to tell... */ ASSERT(r == 0); - r = 0; /* Avoiding warning */ cq_execute(desc); } break; } /* case */ diff --git a/erts/emulator/drivers/common/inet_drv.c b/erts/emulator/drivers/common/inet_drv.c index 426917bd2c..c617afe111 100644 --- a/erts/emulator/drivers/common/inet_drv.c +++ b/erts/emulator/drivers/common/inet_drv.c @@ -9567,8 +9567,9 @@ static int packet_inet_ctl(ErlDrvData e, unsigned int cmd, char* buf, int len, */ int code; char tbuf[2]; +#ifdef HAVE_SCTP unsigned timeout; - +#endif DEBUGF(("packet_inet_ctl(%ld): CONNECT\r\n", (long)desc->port)); /* INPUT: [ Timeout(4), Port(2), Address(N) ] */ @@ -9629,7 +9630,7 @@ static int packet_inet_ctl(ErlDrvData e, unsigned int cmd, char* buf, int len, else if (len < 6) return ctl_error(EINVAL, rbuf, rsize); else { - timeout = get_int32(buf); /* IGNORED */ + /* Ignore timeout */ buf += 4; len -= 4; if (inet_set_address(desc->sfamily, |