Project

General

Profile

Actions

Bug #8828

closed

udapl: value computed is not used

Added by Toomas Soome almost 5 years ago. Updated almost 5 years ago.

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

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:

Description

Debug build error from gcc 6:

    In file included from /code/illumos-gate/usr/src/lib/udapl/udapl_tavor/include/dapl.h:53:0,
                     from /code/illumos-gate/usr/src/lib/udapl/udapl_tavor/include/dapl_evd_util.h:48,
                     from ../common/dapl_evd_util.c:42:
    ../common/dapl_evd_util.c: In function 'dapli_evd_event_alloc':
    /code/illumos-gate/usr/src/lib/udapl/udapl_tavor/include/dapl_osd.h:125:43: error: value computed is not used [-Werror=unused-value]
         (atomic_add_32_nv((uint32_t *)(v), 1) - 1))
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
    ../common/dapl_evd_util.c:312:3: note: in expansion of macro 'dapl_os_atomic_inc'
       dapl_os_atomic_inc(&cno_ptr->cno_ref_count);
       ^~~~~~~~~~~~~~~~~~
    ../common/dapl_evd_util.c: In function 'dapls_evd_dealloc':
    /code/illumos-gate/usr/src/lib/udapl/udapl_tavor/include/dapl_osd.h:136:44: error: value computed is not used [-Werror=unused-value]
         (atomic_add_32_nv((uint32_t *)(v), -1) + 1))
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
    ../common/dapl_evd_util.c:376:3: note: in expansion of macro 'dapl_os_atomic_dec'
       dapl_os_atomic_dec(&evd_ptr->cno_ptr->cno_ref_count);
       ^~~~~~~~~~~~~~~~~~
    ../common/dapl_evd_util.c: In function 'dapli_evd_cqe_to_event':
    /code/illumos-gate/usr/src/lib/udapl/udapl_tavor/include/dapl_osd.h:136:44: error: value computed is not used [-Werror=unused-value]
         (atomic_add_32_nv((uint32_t *)(v), -1) + 1))
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
    ../common/dapl_evd_util.c:1005:5: note: in expansion of macro 'dapl_os_atomic_dec'
         dapl_os_atomic_dec(&srq_ptr->recv_count);
         ^~~~~~~~~~~~~~~~~~
    /code/illumos-gate/usr/src/lib/udapl/udapl_tavor/include/dapl_osd.h:136:44: error: value computed is not used [-Werror=unused-value]
         (atomic_add_32_nv((uint32_t *)(v), -1) + 1))
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
    ../common/dapl_evd_util.c:1008:5: note: in expansion of macro 'dapl_os_atomic_dec'
         dapl_os_atomic_dec(&ep_ptr->recv_count);
         ^~~~~~~~~~~~~~~~~~
    /code/illumos-gate/usr/src/lib/udapl/udapl_tavor/include/dapl_osd.h:136:44: error: value computed is not used [-Werror=unused-value]
         (atomic_add_32_nv((uint32_t *)(v), -1) + 1))
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
    ../common/dapl_evd_util.c:1012:4: note: in expansion of macro 'dapl_os_atomic_dec'
        dapl_os_atomic_dec(&ep_ptr->req_count);
        ^~~~~~~~~~~~~~~~~~
    /code/illumos-gate/usr/src/lib/udapl/udapl_tavor/include/dapl_osd.h:136:44: error: value computed is not used [-Werror=unused-value]
         (atomic_add_32_nv((uint32_t *)(v), -1) + 1))
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
    ../common/dapl_evd_util.c:1147:3: note: in expansion of macro 'dapl_os_atomic_dec'
       dapl_os_atomic_dec(&ep_ptr->req_count);
       ^~~~~~~~~~~~~~~~~~
    cc1: all warnings being treated as errors

Actions #1

Updated by Electric Monk almost 5 years ago

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

git commit fb4cdc19f4c1650a26fa4b7f4faf5a036225c7d4

commit  fb4cdc19f4c1650a26fa4b7f4faf5a036225c7d4
Author: Toomas Soome <tsoome@me.com>
Date:   2017-12-04T22:25:09.000Z

    8828 udapl: value computed is not used
    Reviewed by: Yuri Pankov <yuripv@gmx.com>
    Reviewed by: Gary Mills <gary_mills@fastmail.fm>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions

Also available in: Atom PDF