Project

General

Profile

Actions

Bug #8767

closed

cmd/hal: variable set but not used

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

Status:
Closed
Priority:
Normal
Assignee:
Category:
cmd - userland programs
Start date:
2017-11-06
Due date:
% Done:

100%

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

Description

Debug build errors with gcc 6:

    devinfo_storage.c:1579:14: error: variable 'device_file' set but not used [-Werror=unused-but-set-variable]
      const char *device_file;
                  ^~~~~~~~~~~

    device_info.c: In function 'process_fdi_file':
    device_info.c:1371:9: error: variable 'read' set but not used [-Werror=unused-but-set-variable]
      size_t read;
             ^~~~

    hald.c: In function 'handle_sigterm':
    hald.c:244:10: error: variable 'written' set but not used [-Werror=unused-but-set-variable]
      ssize_t written;
              ^~~~~~~
    hald.c: In function 'main':
    hald.c:478:11: error: variable 'written' set but not used [-Werror=unused-but-set-variable]
       ssize_t written;
               ^~~~~~~
    hald.c:365:8: error: variable 'sigterm_iochn_listener_source_id' set but not used [-Werror=unused-but-set-variable]
      guint sigterm_iochn_listener_source_id;
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    hald.c: In function 'osspec_probe_done':
    hald.c:616:10: error: variable 'written' set but not used [-Werror=unused-but-set-variable]
      ssize_t written;
              ^~~~~~~

    hald_dbus.c:1074:15: error: variable 'rc' set but not used [-Werror=unused-but-set-variable]
       dbus_bool_t rc;
                   ^~

    addon-storage.c:322:6: error: variable 'support_media_changed' set but not used [-Werror=unused-but-set-variable]
      int support_media_changed;
          ^~~~~~~~~~~~~~~~~~~~~

    ../../probing/network-printer/probe-snmp.c: In function 'snmp_get_item':
    ../../probing/network-printer/probe-snmp.c:55:6: error: variable 'status' set but not used [-Werror=unused-but-set-variable]
      int status;
          ^~~~~~

    common.c:116:10: error: variable 'rc' set but not used [-Werror=unused-but-set-variable]
      int sd, rc, errnum;
              ^~

    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 d9e525a856d3050197717c45fb58667e0ee0f297

commit  d9e525a856d3050197717c45fb58667e0ee0f297
Author: Toomas Soome <tsoome@me.com>
Date:   2017-11-16T15:43:01.000Z

    8767 cmd/hal: variable set but not used
    Reviewed by: Yuri Pankov <yuripv@gmx.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions

Also available in: Atom PDF