Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib avoid some uninitalised variable warnings.
details: https://anonhg.NetBSD.org/src/rev/8eba999ad3b1
branches: trunk
changeset: 766930:8eba999ad3b1
user: mrg <mrg%NetBSD.org@localhost>
date: Mon Jul 04 11:46:41 2011 +0000
description:
avoid some uninitalised variable warnings.
diffstat:
lib/libc/gdtoa/hdtoa.c | 5 +++--
lib/libm/src/s_fmaxl.c | 4 +++-
lib/libm/src/s_fminl.c | 4 +++-
3 files changed, 9 insertions(+), 4 deletions(-)
diffs (77 lines):
diff -r 1f1c1584a3a2 -r 8eba999ad3b1 lib/libc/gdtoa/hdtoa.c
--- a/lib/libc/gdtoa/hdtoa.c Mon Jul 04 11:35:26 2011 +0000
+++ b/lib/libc/gdtoa/hdtoa.c Mon Jul 04 11:46:41 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: hdtoa.c,v 1.8 2011/03/21 23:37:42 enami Exp $ */
+/* $NetBSD: hdtoa.c,v 1.9 2011/07/04 11:46:41 mrg Exp $ */
/*-
* Copyright (c) 2004, 2005 David Schultz <das%FreeBSD.ORG@localhost>
@@ -30,7 +30,7 @@
#if 0
__FBSDID("$FreeBSD: src/lib/libc/gdtoa/_hdtoa.c,v 1.4 2007/01/03 04:57:58 das Exp $");
#else
-__RCSID("$NetBSD: hdtoa.c,v 1.8 2011/03/21 23:37:42 enami Exp $");
+__RCSID("$NetBSD: hdtoa.c,v 1.9 2011/07/04 11:46:41 mrg Exp $");
#endif
#include <float.h>
@@ -261,6 +261,7 @@
char *s, *s0;
size_t bufsize;
+ memset(&u, 0, sizeof u);
u.extu_ld = e;
*sign = u.extu_ext.ext_sign;
diff -r 1f1c1584a3a2 -r 8eba999ad3b1 lib/libm/src/s_fmaxl.c
--- a/lib/libm/src/s_fmaxl.c Mon Jul 04 11:35:26 2011 +0000
+++ b/lib/libm/src/s_fmaxl.c Mon Jul 04 11:46:41 2011 +0000
@@ -25,11 +25,12 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: s_fmaxl.c,v 1.2 2010/03/08 01:05:20 snj Exp $");
+__RCSID("$NetBSD: s_fmaxl.c,v 1.3 2011/07/04 11:46:41 mrg Exp $");
#ifdef notdef
__FBSDID("$FreeBSD: src/lib/msun/src/s_fmaxl.c,v 1.1 2004/06/30 07:04:01 das Exp $");
#endif
+#include <string.h>
#include <math.h>
#include <machine/ieee.h>
@@ -39,6 +40,7 @@
{
union ieee_ext_u u[2];
+ memset(&u, 0, sizeof u);
u[0].extu_ld = x;
u[0].extu_ext.ext_frach &= ~0x80000000;
u[1].extu_ld = y;
diff -r 1f1c1584a3a2 -r 8eba999ad3b1 lib/libm/src/s_fminl.c
--- a/lib/libm/src/s_fminl.c Mon Jul 04 11:35:26 2011 +0000
+++ b/lib/libm/src/s_fminl.c Mon Jul 04 11:46:41 2011 +0000
@@ -25,12 +25,13 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: s_fminl.c,v 1.2 2010/03/08 01:05:20 snj Exp $");
+__RCSID("$NetBSD: s_fminl.c,v 1.3 2011/07/04 11:46:41 mrg Exp $");
#ifdef notdef
__FBSDID("$FreeBSD: src/lib/msun/src/s_fminl.c,v 1.1 2004/06/30 07:04:01 das Exp $");
#endif
#include <math.h>
+#include <string.h>
#include <machine/ieee.h>
#ifdef EXT_EXP_INFNAN
@@ -39,6 +40,7 @@
{
union ieee_ext_u u[2];
+ memset(&u, 0, sizeof u);
u[0].extu_ld = x;
u[0].extu_ext.ext_frach &= ~0x80000000;
u[1].extu_ld = y;
Home |
Main Index |
Thread Index |
Old Index