8767 cmd/hal: variable set but not used

Review Request #707 — Created Nov. 6, 2017 and submitted

tsoome
illumos-gate
8767
962131b...
general
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


yuripv
  1. I know that we did discuss it previously, but if you really think that fixing external code instead of silencing the warnings is worth it, ship it.

  2. 
      
jgmills
  1. Are the hal developers aware of these issues?

    1. https://en.wikipedia.org/wiki/HAL_(software)
      HAL is now deprecated on most Linux distributions and on FreeBSD. Functionality is being merged into udev on Linux as of 2008–2010 and devd on FreeBSD. Previously, HAL was built on top of udev.

      This is just another dead code.

  2. 
      
tsoome
Review request changed

Status: Closed (submitted)

Loading...