Fix a couple more warnings

This commit is contained in:
Matt Arsenault 2013-01-01 05:42:46 -05:00
parent 6ecb796e77
commit f770954d30
3 changed files with 8 additions and 4 deletions

View File

@ -124,6 +124,7 @@ void zmq::object_t::process_command (command_t &cmd_)
process_reaped (); process_reaped ();
break; break;
case command_t::done:
default: default:
zmq_assert (false); zmq_assert (false);
} }

View File

@ -331,10 +331,13 @@ int zmq::options_t::setsockopt (int option_, const void *optval_,
return 0; return 0;
} }
} }
} default:
{
errno = EINVAL; errno = EINVAL;
return -1; return -1;
} }
}
}
int zmq::options_t::getsockopt (int option_, void *optval_, size_t *optvallen_) int zmq::options_t::getsockopt (int option_, void *optval_, size_t *optvallen_)
{ {

View File

@ -202,8 +202,8 @@ void zmq::signaler_t::recv ()
// one, return it back to the eventfd object. // one, return it back to the eventfd object.
if (unlikely (dummy == 2)) { if (unlikely (dummy == 2)) {
const uint64_t inc = 1; const uint64_t inc = 1;
ssize_t sz = write (w, &inc, sizeof (inc)); ssize_t sz2 = write (w, &inc, sizeof (inc));
errno_assert (sz == sizeof (inc)); errno_assert (sz2 == sizeof (inc));
return; return;
} }