summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToomas Soome <tsoome@me.com>2021-03-01 20:53:48 +0200
committerToomas Soome <tsoome@me.com>2021-03-03 08:32:21 +0200
commitc764c31dc69b9f3126169050c6e4b771cea45370 (patch)
treeddf18506150bb6be5b5ba9f1f7bcf937d2924116
parent454c9e74c7c117274fb3612dc713f144088203bf (diff)
downloadillumos-joyent-c764c31dc69b9f3126169050c6e4b771cea45370.tar.gz
13593 libc: uninitialized variables
Reviewed by: Rich Lowe <richlowe@richlowe.net> Reviewed by: C Fraire <cfraire@me.com> Approved by: Dan McDonald <danmcd@joyent.com>
-rw-r--r--usr/src/lib/libc/i386/fp/_D_cplx_lr_div.c4
-rw-r--r--usr/src/lib/libc/i386/fp/_D_cplx_lr_div_ix.c4
-rw-r--r--usr/src/lib/libc/i386/fp/_D_cplx_lr_div_rx.c4
-rw-r--r--usr/src/lib/libc/i386/fp/_D_cplx_mul.c6
-rw-r--r--usr/src/lib/libc/i386/fp/_F_cplx_lr_div.c4
-rw-r--r--usr/src/lib/libc/i386/fp/_F_cplx_lr_div_ix.c4
-rw-r--r--usr/src/lib/libc/i386/fp/_F_cplx_lr_div_rx.c4
-rw-r--r--usr/src/lib/libc/i386/fp/_F_cplx_mul.c4
-rw-r--r--usr/src/lib/libc/i386/fp/_X_cplx_lr_div.c4
-rw-r--r--usr/src/lib/libc/i386/fp/_X_cplx_lr_div_ix.c4
-rw-r--r--usr/src/lib/libc/i386/fp/_X_cplx_lr_div_rx.c4
-rw-r--r--usr/src/lib/libc/i386/fp/_X_cplx_mul.c4
12 files changed, 13 insertions, 37 deletions
diff --git a/usr/src/lib/libc/i386/fp/_D_cplx_lr_div.c b/usr/src/lib/libc/i386/fp/_D_cplx_lr_div.c
index 19d6bab92a..22d10279bd 100644
--- a/usr/src/lib/libc/i386/fp/_D_cplx_lr_div.c
+++ b/usr/src/lib/libc/i386/fp/_D_cplx_lr_div.c
@@ -24,8 +24,6 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* _D_cplx_lr_div(z, w) returns z / w computed by the textbook
* formula without regard to exceptions or special cases.
@@ -41,7 +39,7 @@
double _Complex
_D_cplx_lr_div(double _Complex z, double _Complex w)
{
- double _Complex v;
+ double _Complex v = 0;
long double a, b, c, d, r;
/* LINTED alignment */
diff --git a/usr/src/lib/libc/i386/fp/_D_cplx_lr_div_ix.c b/usr/src/lib/libc/i386/fp/_D_cplx_lr_div_ix.c
index aa37afcee0..1fbdb6459c 100644
--- a/usr/src/lib/libc/i386/fp/_D_cplx_lr_div_ix.c
+++ b/usr/src/lib/libc/i386/fp/_D_cplx_lr_div_ix.c
@@ -24,8 +24,6 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* _D_cplx_div_ix(b, w) returns (I * b) / w computed by the text-
* book formula without regard to exceptions or special cases.
@@ -41,7 +39,7 @@
double _Complex
_D_cplx_lr_div_ix(double b, double _Complex w)
{
- double _Complex v;
+ double _Complex v = 0;
long double c, d, r;
/* LINTED alignment */
diff --git a/usr/src/lib/libc/i386/fp/_D_cplx_lr_div_rx.c b/usr/src/lib/libc/i386/fp/_D_cplx_lr_div_rx.c
index d0e4d43f69..0ccf7d9ee3 100644
--- a/usr/src/lib/libc/i386/fp/_D_cplx_lr_div_rx.c
+++ b/usr/src/lib/libc/i386/fp/_D_cplx_lr_div_rx.c
@@ -24,8 +24,6 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* _D_cplx_lr_div_rx(a, w) returns a / w computed by the textbook
* formula without regard to exceptions or special cases.
@@ -41,7 +39,7 @@
double _Complex
_D_cplx_lr_div_rx(double a, double _Complex w)
{
- double _Complex v;
+ double _Complex v = 0;
long double c, d, r;
/* LINTED alignment */
diff --git a/usr/src/lib/libc/i386/fp/_D_cplx_mul.c b/usr/src/lib/libc/i386/fp/_D_cplx_mul.c
index 4d34d5224a..89df44dc9f 100644
--- a/usr/src/lib/libc/i386/fp/_D_cplx_mul.c
+++ b/usr/src/lib/libc/i386/fp/_D_cplx_mul.c
@@ -24,8 +24,6 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* _D_cplx_mul(z, w) returns z * w with infinities handled according
* to C99.
@@ -74,13 +72,13 @@ testinf(double x)
xx.d = x;
return (((((xx.i[1] << 1) - 0xffe00000) | xx.i[0]) == 0)?
- (1 | (xx.i[1] >> 31)) : 0);
+ (1 | (xx.i[1] >> 31)) : 0);
}
double _Complex
_D_cplx_mul(double _Complex z, double _Complex w)
{
- double _Complex v;
+ double _Complex v = 0;
double a, b, c, d;
long double x, y;
int recalc, i, j;
diff --git a/usr/src/lib/libc/i386/fp/_F_cplx_lr_div.c b/usr/src/lib/libc/i386/fp/_F_cplx_lr_div.c
index 53bccfacf4..37340c529b 100644
--- a/usr/src/lib/libc/i386/fp/_F_cplx_lr_div.c
+++ b/usr/src/lib/libc/i386/fp/_F_cplx_lr_div.c
@@ -24,8 +24,6 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* _F_cplx_lr_div(z, w) returns z / w computed by the textbook
* formula without regard to exceptions or special cases.
@@ -41,7 +39,7 @@
float _Complex
_F_cplx_lr_div(float _Complex z, float _Complex w)
{
- float _Complex v;
+ float _Complex v = 0;
long double a, b, c, d, r;
a = ((float *)&z)[0];
diff --git a/usr/src/lib/libc/i386/fp/_F_cplx_lr_div_ix.c b/usr/src/lib/libc/i386/fp/_F_cplx_lr_div_ix.c
index d43a346e98..0ab7991005 100644
--- a/usr/src/lib/libc/i386/fp/_F_cplx_lr_div_ix.c
+++ b/usr/src/lib/libc/i386/fp/_F_cplx_lr_div_ix.c
@@ -24,8 +24,6 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* _F_cplx_div_ix(b, w) returns (I * b) / w computed by the text-
* book formula without regard to exceptions or special cases.
@@ -41,7 +39,7 @@
float _Complex
_F_cplx_lr_div_ix(float b, float _Complex w)
{
- float _Complex v;
+ float _Complex v = 0;
long double c, d, r;
c = ((float *)&w)[0];
diff --git a/usr/src/lib/libc/i386/fp/_F_cplx_lr_div_rx.c b/usr/src/lib/libc/i386/fp/_F_cplx_lr_div_rx.c
index 7192c150d6..3ea175fbc0 100644
--- a/usr/src/lib/libc/i386/fp/_F_cplx_lr_div_rx.c
+++ b/usr/src/lib/libc/i386/fp/_F_cplx_lr_div_rx.c
@@ -24,8 +24,6 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* _F_cplx_lr_div_rx(a, w) returns a / w computed by the textbook
* formula without regard to exceptions or special cases.
@@ -41,7 +39,7 @@
float _Complex
_F_cplx_lr_div_rx(float a, float _Complex w)
{
- float _Complex v;
+ float _Complex v = 0;
long double c, d, r;
c = ((float *)&w)[0];
diff --git a/usr/src/lib/libc/i386/fp/_F_cplx_mul.c b/usr/src/lib/libc/i386/fp/_F_cplx_mul.c
index 7c2a170815..2c74215791 100644
--- a/usr/src/lib/libc/i386/fp/_F_cplx_mul.c
+++ b/usr/src/lib/libc/i386/fp/_F_cplx_mul.c
@@ -24,8 +24,6 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* _F_cplx_mul(z, w) returns z * w with infinities handled according
* to C99.
@@ -79,7 +77,7 @@ testinff(float x)
float _Complex
_F_cplx_mul(float _Complex z, float _Complex w)
{
- float _Complex v;
+ float _Complex v = 0;
float a, b, c, d;
long double x, y;
int recalc, i, j;
diff --git a/usr/src/lib/libc/i386/fp/_X_cplx_lr_div.c b/usr/src/lib/libc/i386/fp/_X_cplx_lr_div.c
index f65868d172..3560bf72ff 100644
--- a/usr/src/lib/libc/i386/fp/_X_cplx_lr_div.c
+++ b/usr/src/lib/libc/i386/fp/_X_cplx_lr_div.c
@@ -24,8 +24,6 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* _X_cplx_lr_div(z, w) returns z / w computed by the textbook
* formula without regard to exceptions or special cases.
@@ -41,7 +39,7 @@
long double _Complex
_X_cplx_lr_div(long double _Complex z, long double _Complex w)
{
- long double _Complex v;
+ long double _Complex v = 0;
long double a, b, c, d, r;
a = ((long double *)&z)[0];
diff --git a/usr/src/lib/libc/i386/fp/_X_cplx_lr_div_ix.c b/usr/src/lib/libc/i386/fp/_X_cplx_lr_div_ix.c
index cd27b7adde..6718077db7 100644
--- a/usr/src/lib/libc/i386/fp/_X_cplx_lr_div_ix.c
+++ b/usr/src/lib/libc/i386/fp/_X_cplx_lr_div_ix.c
@@ -24,8 +24,6 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* _X_cplx_div_ix(b, w) returns (I * b) / w computed by the text-
* book formula without regard to exceptions or special cases.
@@ -41,7 +39,7 @@
long double _Complex
_X_cplx_lr_div_ix(long double b, long double _Complex w)
{
- long double _Complex v;
+ long double _Complex v = 0;
long double c, d, r;
c = ((long double *)&w)[0];
diff --git a/usr/src/lib/libc/i386/fp/_X_cplx_lr_div_rx.c b/usr/src/lib/libc/i386/fp/_X_cplx_lr_div_rx.c
index 914fd10629..00b2646539 100644
--- a/usr/src/lib/libc/i386/fp/_X_cplx_lr_div_rx.c
+++ b/usr/src/lib/libc/i386/fp/_X_cplx_lr_div_rx.c
@@ -24,8 +24,6 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* _X_cplx_lr_div_rx(a, w) returns a / w computed by the textbook
* formula without regard to exceptions or special cases.
@@ -41,7 +39,7 @@
long double _Complex
_X_cplx_lr_div_rx(long double a, long double _Complex w)
{
- long double _Complex v;
+ long double _Complex v = 0;
long double c, d, r;
c = ((long double *)&w)[0];
diff --git a/usr/src/lib/libc/i386/fp/_X_cplx_mul.c b/usr/src/lib/libc/i386/fp/_X_cplx_mul.c
index 6ecebb4d7a..2306d5a2af 100644
--- a/usr/src/lib/libc/i386/fp/_X_cplx_mul.c
+++ b/usr/src/lib/libc/i386/fp/_X_cplx_mul.c
@@ -24,8 +24,6 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* _X_cplx_mul(z, w) returns z * w with infinities handled according
* to C99.
@@ -83,7 +81,7 @@ testinfl(long double x)
long double _Complex
_X_cplx_mul(long double _Complex z, long double _Complex w)
{
- long double _Complex v;
+ long double _Complex v = 0;
long double a, b, c, d, x, y;
int recalc, i, j;