Project

General

Profile

Bug #5724

sparc build noise in libm

Added by Gordon Ross about 5 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Start date:
2015-03-17
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:

Description

See lint noise like:

"../common/Q/asinhl.c", line 43: warning: variable unused in function: dummy in asinhl (E_FUNC_VAR_UNUSED)
"../common/Q/asinl.c", line 54: warning: variable unused in function: dummy in asinl (E_FUNC_VAR_UNUSED)
"../common/Q/tanhl.c", line 73: warning: variable unused in function: dummy in tanhl (E_FUNC_VAR_UNUSED)
"../common/dt_consume.c", line 1845: warning: pointer cast may result in improper alignment (E_BAD_PTR_CAST_ALIGN)

History

#1

Updated by Gordon Ross about 5 years ago

  • Status changed from New to In Progress
  • Assignee set to Gordon Ross

Hide the "unused" variables from lint:

diff --git a/usr/src/lib/libm/common/Q/asinhl.c b/usr/src/lib/libm/common/Q/asinhl.c
index e3dd9de..fd6ea48 100644
--- a/usr/src/lib/libm/common/Q/asinhl.c
+++ b/usr/src/lib/libm/common/Q/asinhl.c
@@ -40,7 +40,9 @@ static const long double
 long double
 asinhl(long double x) {
     long double t, w;
+#ifndef lint
     volatile long double dummy;
+#endif

     w = fabsl(x);
     if (isnanl(x))
diff --git a/usr/src/lib/libm/common/Q/asinl.c b/usr/src/lib/libm/common/Q/asinl.c
index 620e477..3c6c536 100644
--- a/usr/src/lib/libm/common/Q/asinl.c
+++ b/usr/src/lib/libm/common/Q/asinl.c
@@ -51,7 +51,9 @@ static const long double big = 1.0e+20L;
 long double
 asinl(long double x) {
     long double t, w;
+#ifndef lint
     volatile long double dummy;
+#endif

     w = fabsl(x);
     if (isnanl(x))
diff --git a/usr/src/lib/libm/common/Q/tanhl.c b/usr/src/lib/libm/common/Q/tanhl.c
index 453adf3..f5846d6 100644
--- a/usr/src/lib/libm/common/Q/tanhl.c
+++ b/usr/src/lib/libm/common/Q/tanhl.c
@@ -70,7 +70,9 @@ long double
 tanhl(long double x) {
     long double t, y, z;
     int signx;
+#ifndef lint
     volatile long double dummy;
+#endif

     if (isnanl(x))
         return (x + x);        /* x is NaN */

#2

Updated by Electric Monk about 5 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 0 to 100

git commit 61ec6b12089c560a32ebd9efdbb057ff92665e60

commit  61ec6b12089c560a32ebd9efdbb057ff92665e60
Author: Gordon Ross <gwr@nexenta.com>
Date:   2015-03-18T02:45:17.000Z

    5724 sparc build noise in libm
    Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com>
    Approved by: Dan McDonald <danmcd@omniti.com>

Also available in: Atom PDF