aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/sys/unix
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2010-02-08 14:04:16 +0000
committerErlang/OTP <[email protected]>2010-02-08 15:54:01 +0100
commita4e2377c72f2e6f018792dff10ed967f08cfac5f (patch)
tree2d5e2debd474214220c59a7596934ee26ed64e07 /erts/emulator/sys/unix
parent2db75179169db7ae0126f4d12d6f8a16fded84eb (diff)
downloadotp-a4e2377c72f2e6f018792dff10ed967f08cfac5f.tar.gz
otp-a4e2377c72f2e6f018792dff10ed967f08cfac5f.tar.bz2
otp-a4e2377c72f2e6f018792dff10ed967f08cfac5f.zip
OTP-8412 Fixed numerous compiler warnings generated by gcc 4.4.1 and
tile-cc 2.0.1.78377 when compiling the runtime system.
Diffstat (limited to 'erts/emulator/sys/unix')
-rw-r--r--erts/emulator/sys/unix/sys.c17
-rw-r--r--erts/emulator/sys/unix/sys_float.c13
2 files changed, 15 insertions, 15 deletions
diff --git a/erts/emulator/sys/unix/sys.c b/erts/emulator/sys/unix/sys.c
index 183525b222..31ab5d03de 100644
--- a/erts/emulator/sys/unix/sys.c
+++ b/erts/emulator/sys/unix/sys.c
@@ -1,19 +1,19 @@
/*
* %CopyrightBegin%
- *
- * Copyright Ericsson AB 1996-2009. All Rights Reserved.
- *
+ *
+ * Copyright Ericsson AB 1996-2010. All Rights Reserved.
+ *
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
* compliance with the License. You should have received a copy of the
* Erlang Public License along with this software. If not, it can be
* retrieved online at http://www.erlang.org/.
- *
+ *
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
* the License for the specific language governing rights and limitations
* under the License.
- *
+ *
* %CopyrightEnd%
*/
@@ -709,7 +709,7 @@ prepare_crash_dump(void)
if (nice_val > 39) {
nice_val = 39;
}
- nice(nice_val);
+ erts_silence_warn_unused_result(nice(nice_val));
}
envsz = sizeof(env);
@@ -2332,7 +2332,7 @@ sys_async_ready_failed(int fd, int r, int err)
char buf[120];
sprintf(buf, "sys_async_ready(): Fatal error: fd=%d, r=%d, errno=%d\n",
fd, r, err);
- (void) write(2, buf, strlen(buf));
+ erts_silence_warn_unused_result(write(2, buf, strlen(buf)));
abort();
}
@@ -2891,7 +2891,7 @@ smp_sig_notify(char c)
char msg[] =
"smp_sig_notify(): Failed to notify signal-dispatcher thread "
"about received signal";
- (void) write(2, msg, sizeof(msg));
+ erts_silence_warn_unused_result(write(2, msg, sizeof(msg)));
abort();
}
}
@@ -3121,7 +3121,6 @@ erl_sys_args(int* argc, char** argv)
*argc = j;
}
-
#ifdef ERTS_TIMER_THREAD
/*
diff --git a/erts/emulator/sys/unix/sys_float.c b/erts/emulator/sys/unix/sys_float.c
index 15da6ab45c..c59c99f65e 100644
--- a/erts/emulator/sys/unix/sys_float.c
+++ b/erts/emulator/sys/unix/sys_float.c
@@ -1,19 +1,19 @@
/*
* %CopyrightBegin%
- *
- * Copyright Ericsson AB 2001-2009. All Rights Reserved.
- *
+ *
+ * Copyright Ericsson AB 2001-2010. All Rights Reserved.
+ *
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
* compliance with the License. You should have received a copy of the
* Erlang Public License along with this software. If not, it can be
* retrieved online at http://www.erlang.org/.
- *
+ *
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
* the License for the specific language governing rights and limitations
* under the License.
- *
+ *
* %CopyrightEnd%
*/
@@ -93,7 +93,8 @@ void erts_fp_check_init_error(volatile unsigned long *fpexnp)
char buf[64];
snprintf(buf, sizeof buf, "ERTS_FP_CHECK_INIT at %p: detected unhandled FPE at %p\r\n",
__builtin_return_address(0), (void*)*fpexnp);
- write(2, buf, strlen(buf));
+ if (write(2, buf, strlen(buf)) <= 0)
+ erl_exit(ERTS_ABORT_EXIT, "%s", buf);
*fpexnp = 0;
#if defined(__i386__) || defined(__x86_64__)
erts_restore_fpu();