Bug 1402261 - cli: compile warnings (unused var) if building without bd xlator
Summary: cli: compile warnings (unused var) if building without bd xlator
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: cli
Version: mainline
Hardware: All
OS: All
unspecified
low
Target Milestone: ---
Assignee: Michael Adam
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-12-07 07:05 UTC by Michael Adam
Modified: 2017-03-06 17:38 UTC (History)
3 users (show)

Fixed In Version: glusterfs-3.10.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-03-06 17:38:27 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Michael Adam 2016-12-07 07:05:18 UTC
Description of problem:

building wthout bd xlator, we get compiler warnings in cli:

  CC       cli-rpc-ops.o
cli-rpc-ops.c: In function ‘gf_cli_get_volume_cbk’:
cli-rpc-ops.c:846:36: warning: variable ‘caps’ set but not used [-Wunused-but-set-variable]
         char                      *caps                 = NULL;
                                    ^~~~
  CC       cli-cmd-parser.o
  CC       cli-cmd-system.o
  CC       cli-cmd-misc.o
  CC       cli-xml-output.o
cli-xml-output.c: In function ‘cli_xml_output_vol_info’:
cli-xml-output.c:2605:34: warning: variable ‘caps’ set but not used [-Wunused-but-set-variable]
         char                    *caps = NULL;
                                  ^~~~
  CC       cli-quotad-client.o


Version-Release number of selected component (if applicable):

main

How reproducible:

always

Steps to Reproduce:
1. ./configure
2. make
3. look at output

Actual results:

compile warnings

Expected results:

no warnings

Comment 1 Michael Adam 2016-12-07 07:05:49 UTC
patch coming...

Comment 2 Worker Ant 2016-12-07 07:06:53 UTC
REVIEW: http://review.gluster.org/16050 (cli: fix compiler warning (unused var) when building without bd xlator) posted (#1) for review on master by Michael Adam (obnox)

Comment 3 Worker Ant 2016-12-14 17:19:15 UTC
REVIEW: http://review.gluster.org/15982 (cli: Suppress unused but set warnings) posted (#2) for review on master by Vijay Bellur (vbellur)

Comment 4 Worker Ant 2016-12-14 18:21:08 UTC
COMMIT: http://review.gluster.org/15982 committed in master by Atin Mukherjee (amukherj) 
------
commit 75ad1dd5ef98053be1fd1e8aa4a1fef1ac32ef3a
Author: Vijay Bellur <vbellur>
Date:   Wed Nov 30 12:54:05 2016 -0500

    cli: Suppress unused but set warnings
    
    GCC has the following complaint during compilation:
    
    ../../../cli/src/cli-rpc-ops.c: In function ‘gf_cli_get_volume_cbk’:
    ../../../cli/src/cli-rpc-ops.c:846:36: warning: variable ‘caps’ set but not used
    [-Wunused-but-set-variable]
             char                      *caps                 = NULL;
    
    Change-Id: Ia378a6c83ba70ae35290802b7b38ad2830c0956c
    BUG: 1402261
    Signed-off-by: Vijay Bellur <vbellur>
    Reviewed-on: http://review.gluster.org/15982
    NetBSD-regression: NetBSD Build System <jenkins.org>
    CentOS-regression: Gluster Build System <jenkins.org>
    Smoke: Gluster Build System <jenkins.org>
    Reviewed-by: Atin Mukherjee <amukherj>

Comment 5 Shyamsundar 2017-03-06 17:38:27 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.10.0, please open a new bug report.

glusterfs-3.10.0 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] http://lists.gluster.org/pipermail/gluster-users/2017-February/030119.html
[2] https://www.gluster.org/pipermail/gluster-users/


Note You need to log in before you can comment on or make changes to this bug.