diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2010-11-20 13:35:56 +0100 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2010-11-21 19:11:05 -0800 |
commit | 80b5a52217ad58b0d71993c2477a4a17bf6c84a2 (patch) | |
tree | 4707caa21f020ceed7fa22b5f7750975f649f13b /src/node_stdio.cc | |
parent | a87172f9b21eb36cfde9dc96cc011a33e6bb93fd (diff) | |
download | node-80b5a52217ad58b0d71993c2477a4a17bf6c84a2.tar.gz |
Fix compiler warnings.
Diffstat (limited to 'src/node_stdio.cc')
-rw-r--r-- | src/node_stdio.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/node_stdio.cc b/src/node_stdio.cc index 659675816..e36f4adf5 100644 --- a/src/node_stdio.cc +++ b/src/node_stdio.cc @@ -129,7 +129,7 @@ WriteError (const Arguments& args) ssize_t r; size_t written = 0; - while (written < msg.length()) { + while (written < (size_t) msg.length()) { r = write(STDERR_FILENO, (*msg) + written, msg.length() - written); if (r < 0) { if (errno == EAGAIN || errno == EIO) { @@ -217,7 +217,7 @@ void Stdio::Initialize(v8::Handle<v8::Object> target) { // XXX selecting on tty fds wont work in windows. // Must ALWAYS make a coupling on shitty platforms. stdout_flags = fcntl(STDOUT_FILENO, F_GETFL, 0); - int r = fcntl(STDOUT_FILENO, F_SETFL, stdout_flags | O_NONBLOCK); + fcntl(STDOUT_FILENO, F_SETFL, stdout_flags | O_NONBLOCK); } target->Set(String::NewSymbol("stdoutFD"), Integer::New(STDOUT_FILENO)); @@ -233,8 +233,10 @@ void Stdio::Initialize(v8::Handle<v8::Object> target) { NODE_SET_METHOD(target, "getRows", GetRows); NODE_SET_METHOD(target, "isatty", IsATTY); - struct sigaction sa = {0}; + struct sigaction sa; + memset(&sa, 0, sizeof(sa)); sa.sa_handler = HandleSIGCONT; + sa.sa_restorer = NULL; sigaction(SIGCONT, &sa, NULL); } |