mirror of https://github.com/nodejs/node.git
Fix unused variable warnings.
parent
89320036a8
commit
e876d6629e
12
src/net.cc
12
src/net.cc
|
@ -75,13 +75,15 @@ Connection::Initialize (v8::Handle<v8::Object> target)
|
|||
}
|
||||
|
||||
Handle<Value>
|
||||
Connection::ReadyStateGetter (Local<String> _, const AccessorInfo& info)
|
||||
Connection::ReadyStateGetter (Local<String> property, const AccessorInfo& info)
|
||||
{
|
||||
Connection *connection = NODE_UNWRAP(Connection, info.This());
|
||||
if (!connection) return Handle<Value>();
|
||||
|
||||
HandleScope scope;
|
||||
|
||||
assert(property == READY_STATE_SYMBOL);
|
||||
|
||||
switch(connection->ReadyState()) {
|
||||
case OPEN: return scope.Close(OPEN_SYMBOL);
|
||||
case OPENING: return scope.Close(OPENING_SYMBOL);
|
||||
|
@ -131,12 +133,6 @@ Connection::~Connection ()
|
|||
ForceClose();
|
||||
}
|
||||
|
||||
void
|
||||
Connection::SetServer (Handle<Object> server_handle)
|
||||
{
|
||||
HandleScope scope;
|
||||
}
|
||||
|
||||
Handle<Value>
|
||||
Connection::New (const Arguments& args)
|
||||
{
|
||||
|
@ -557,6 +553,8 @@ Server::OnConnection (struct sockaddr *addr, socklen_t len)
|
|||
{
|
||||
HandleScope scope;
|
||||
|
||||
assert(len > 0); // just to get rid of the warning.
|
||||
|
||||
TryCatch try_catch;
|
||||
|
||||
Local<Object> js_connection =
|
||||
|
|
|
@ -42,8 +42,6 @@ protected:
|
|||
void FullClose (void) { oi_socket_full_close(&socket_); }
|
||||
void ForceClose (void) { oi_socket_force_close(&socket_); }
|
||||
|
||||
void SetServer (v8::Handle<v8::Object> server_handle);
|
||||
|
||||
virtual void OnConnect (void);
|
||||
virtual void OnReceive (const void *buf, size_t len);
|
||||
virtual void OnDrain (void);
|
||||
|
|
11
src/node.cc
11
src/node.cc
|
@ -83,9 +83,12 @@ ObjectWrap::Unwrap (Handle<Object> handle)
|
|||
}
|
||||
|
||||
void
|
||||
ObjectWrap::MakeWeak (Persistent<Value> _, void *data)
|
||||
ObjectWrap::MakeWeak (Persistent<Value> value, void *data)
|
||||
{
|
||||
ObjectWrap *obj = static_cast<ObjectWrap*> (data);
|
||||
|
||||
assert(value == obj->handle_);
|
||||
|
||||
obj->weak_ = true;
|
||||
if (obj->attach_count_ == 0)
|
||||
delete obj;
|
||||
|
@ -247,9 +250,11 @@ node::FatalException (TryCatch &try_catch)
|
|||
static ev_async eio_watcher;
|
||||
|
||||
static void
|
||||
node_eio_cb (EV_P_ ev_async *w, int revents)
|
||||
node_eio_cb (EV_P_ ev_async *watcher, int revents)
|
||||
{
|
||||
int r = eio_poll();
|
||||
assert(watcher == &eio_watcher);
|
||||
assert(revents == EV_ASYNC);
|
||||
eio_poll();
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -65,12 +65,13 @@ Process::New (const Arguments& args)
|
|||
}
|
||||
|
||||
Handle<Value>
|
||||
Process::PIDGetter (Local<String> _, const AccessorInfo& info)
|
||||
Process::PIDGetter (Local<String> property, const AccessorInfo& info)
|
||||
{
|
||||
Process *process = NODE_UNWRAP(Process, info.This());
|
||||
assert(process);
|
||||
|
||||
HandleScope scope;
|
||||
Process *process = NODE_UNWRAP(Process, info.This());
|
||||
|
||||
assert(process);
|
||||
assert(property == PID_SYMBOL);
|
||||
|
||||
if (process->pid_ == 0) return Null();
|
||||
|
||||
|
|
|
@ -59,6 +59,8 @@ Timer::OnTimeout (EV_P_ ev_timer *watcher, int revents)
|
|||
{
|
||||
Timer *timer = static_cast<Timer*>(watcher->data);
|
||||
|
||||
assert(revents == EV_TIMEOUT);
|
||||
|
||||
timer->Emit("Timeout", 0, NULL);
|
||||
|
||||
/* XXX i'm a bit worried if this is the correct test?
|
||||
|
|
|
@ -15,7 +15,7 @@ server.listen(PORT);
|
|||
var got_good_server_content = false;
|
||||
var bad_server_got_error = false;
|
||||
|
||||
function onLoad() {
|
||||
function onLoad () {
|
||||
node.http.cat("http://localhost:"+PORT+"/", "utf8")
|
||||
.addCallback(function (content) {
|
||||
node.debug("got response");
|
||||
|
|
|
@ -15,7 +15,7 @@ server.listen(PORT);
|
|||
var errors = 0;
|
||||
var successes = 0;
|
||||
|
||||
function onLoad() {
|
||||
function onLoad () {
|
||||
var promise = node.cat("http://localhost:"+PORT, "utf8");
|
||||
|
||||
promise.addCallback(function (content) {
|
||||
|
|
Loading…
Reference in New Issue