diff options
author | Patrik Nyblom <[email protected]> | 2011-11-18 20:47:31 +0100 |
---|---|---|
committer | Patrik Nyblom <[email protected]> | 2011-11-18 20:47:31 +0100 |
commit | 49052a3d7422e0e776a8df83fa3d8280686cab0f (patch) | |
tree | 2d098ea2b49235f2cff79e70d91c88ec9f1cf03c /erts/emulator/drivers | |
parent | 7d9ef0fdde8119e1be0a47e3e45c9cdb85f926d8 (diff) | |
parent | 08d4822dd22465da4a452484780b285a93192fce (diff) | |
download | otp-49052a3d7422e0e776a8df83fa3d8280686cab0f.tar.gz otp-49052a3d7422e0e776a8df83fa3d8280686cab0f.tar.bz2 otp-49052a3d7422e0e776a8df83fa3d8280686cab0f.zip |
Merge branch 'pan/binary_match_scope/OTP-9701'
* pan/binary_match_scope/OTP-9701:
Remove remaining gcc 4.6 assigned-but-not-used warnings from erts
Remove GCC 4.6 set-but-not-used warning from erl_bif_binary
Make binary:match with scope return correct values
Diffstat (limited to 'erts/emulator/drivers')
-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 2ff5f744d6..1fe9e04341 100644 --- a/erts/emulator/drivers/common/inet_drv.c +++ b/erts/emulator/drivers/common/inet_drv.c @@ -9767,8 +9767,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) ] */ @@ -9829,7 +9830,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, |