Project

General

Profile

Actions

Bug #8854

closed

libm: variable set but not used

Added by Toomas Soome over 3 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
lib - userland libraries
Start date:
2017-11-21
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

Debug build error from gcc 6:

    ../common/LD/tanhl.c: In function 'tanhl':
    ../common/LD/tanhl.c:74:23: error: variable 'dummy' set but not used [-Werror=unused-but-set-variable]
      volatile long double dummy;
                           ^~~~~

    ../common/LD/j0l.c:164:13: error: variable 'd' set but not used [-Werror=unused-but-set-variable]
      GENERIC z, d, s, c, ss, cc, u, v;
                 ^
    ../common/LD/asinhl.c:44:23: error: variable 'dummy' set but not used [-Werror=unused-but-set-variable]
      volatile long double dummy;
                           ^~~~~

    ../common/m9x/__fex_i386.c:575:17: error: variable 'c' set but not used [-Werror=unused-but-set-variable]
      volatile int   c;
                     ^
    ../common/R/cosf.c:79:15: error: variable 'i' set but not used [-Werror=unused-but-set-variable]
      volatile int i;
                   ^

    ../common/R/floorf.c:59:17: error: variable 'dummy' set but not used [-Werror=unused-but-set-variable]
      volatile float dummy;
                     ^~~~~
    ../common/R/floorf.c: In function 'floorf':
    ../common/R/floorf.c:87:17: error: variable 'dummy' set but not used [-Werror=unused-but-set-variable]
      volatile float dummy;
                     ^~~~~

    ../common/R/sinf.c:79:15: error: variable 'i' set but not used [-Werror=unused-but-set-variable]
      volatile int i;
                   ^
    ../common/R/sincosf.c:101:15: error: variable 'i' set but not used [-Werror=unused-but-set-variable]
      volatile int i;
                   ^

    ../common/R/tanf.c:79:15: error: variable 'i' set but not used [-Werror=unused-but-set-variable]
      volatile int i;
                   ^

    ../common/R/rintf.c: In function 'anintf':
    ../common/R/rintf.c:88:17: error: variable 'dummy' set but not used [-Werror=unused-but-set-variable]
      volatile float dummy;
                     ^~~~~
    ../common/R/rintf.c: In function 'nintf':
    ../common/R/rintf.c:125:17: error: variable 'dummy' set but not used [-Werror=unused-but-set-variable]
      volatile float dummy;
                     ^~~~~

    ../common/R/ilogbf.c: In function 'raise_invalid':
    ../common/R/ilogbf.c:61:19: error: variable 'dummy' set but not used [-Werror=unused-but-set-variable]
       volatile double dummy;
                       ^~~~~

    ../common/R/atanf.c: In function 'atanf':
    ../common/R/atanf.c:107:18: error: variable 'dummy' set but not used [-Werror=unused-but-set-variable]
      volatile double dummy;
                      ^~~~~

    ../common/R/ilogbf.c:61:19: error: variable 'dummy' set but not used [-Werror=unused-but-set-variable]
       volatile double dummy;
                       ^~~~~

    ../common/m9x/nexttowardl.c:107:24: error: variable 'dummy' set but not used [-Werror=unused-but-set-variable]
       volatile long double dummy;
                            ^~~~~

    ../common/LD/nextafterl.c:107:24: error: variable 'dummy' set but not used [-Werror=unused-but-set-variable]
       volatile long double dummy;
                            ^~~~~

    ../common/C/atan2.c:413:15: error: variable 'inexact' set but not used [-Werror=unused-but-set-variable]
      volatile int inexact;
                   ^~~~~~~

    ../common/C/tanh.c:73:18: error: variable 'dummy' set but not used [-Werror=unused-but-set-variable]
      volatile double dummy;
                      ^~~~~

    cc1: all warnings being treated as errors
    ../common/C/atan2.c:413:15: error: variable 'inexact' set but not used [-Werror=unused-but-set-variable]
      volatile int inexact;
                   ^~~~~~~

    ../common/C/tanh.c:73:18: error: variable 'dummy' set but not used [-Werror=unused-but-set-variable]
      volatile double dummy;
                      ^~~~~

    ../common/C/atan2.c:413:15: error: variable 'inexact' set but not used [-Werror=unused-but-set-variable]
      volatile int inexact;
                   ^~~~~~~

    ../common/C/tanh.c:73:18: error: variable 'dummy' set but not used [-Werror=unused-but-set-variable]
      volatile double dummy;
                      ^~~~~

    ../common/C/nextafter.c:40:18: error: variable 'dummy' set but not used [-Werror=unused-but-set-variable]
      volatile double dummy;

    ../common/C/ilogb.c:65:19: error: variable 'dummy' set but not used [-Werror=unused-but-set-variable]
       volatile double dummy;
                       ^~~~~

    ../common/C/exp.c:296:18: error: variable 'dummy' set but not used [-Werror=unused-but-set-variable]
         volatile int dummy;
                      ^~~~~

Actions #1

Updated by Electric Monk over 3 years ago

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

git commit 862246c1516ca78c11bef09650987f3d7171b2c9

commit  862246c1516ca78c11bef09650987f3d7171b2c9
Author: Toomas Soome <tsoome@me.com>
Date:   2017-12-04T17:04:50.000Z

    8854 libm: variable set but not used
    Reviewed by: Yuri Pankov <yuripv@gmx.com>
    Reviewed by: Robert Mustacchi <rm@joyent.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions

Also available in: Atom PDF