Ticket #266: smartmontools.patch

File smartmontools.patch, 3.0 KB (added by gecko2, 8 years ago)
  • smartmontools-6.

    diff -rauN smartmontools-6.0/os_darwin.cpp smartmontools-6.0-p1/os_darwin.cpp
    old new  
    7272
    7373// tries to guess device type given the name (a path).  See utility.h
    7474// for return values.
    75 int guess_device_type (const char* dev_name) {
     75int guess_device_type (const char* dev_name __attribute__((__unused__))) {
    7676  // Only ATA is supported right now, so that's what it'd better be.
    77   dev_name = dev_name;  // suppress unused warning.
    7877  return CONTROLLER_ATA;
    7978}
    8079
     
    422421
    423422// There's no special handling needed for hidden devices, the kernel
    424423// must deal with them.
    425 int escalade_command_interface(int fd, int escalade_port, int escalade_type,
    426                                smart_command_set command, int select,
    427                                char *data)
     424int escalade_command_interface(int fd __attribute__((__unused__)), int escalade_port __attribute__((__unused__)), int escalade_type __attribute__((__unused__)),
     425                               smart_command_set command __attribute__((__unused__)), int select __attribute__((__unused__)),
     426                               char *data __attribute__((__unused__)))
    428427{
    429   fd = fd;
    430   escalade_port = escalade_port;
    431   escalade_type = escalade_type;
    432   command = command;
    433   select = select;
    434   data = data;
    435428  return -1;
    436429}
    437430
    438 int areca_command_interface(int fd, int escalade_port,
    439                                smart_command_set command, int select,
    440                                char *data)
     431int areca_command_interface(int fd __attribute__((__unused__)), int escalade_port __attribute__((__unused__)),
     432                               smart_command_set command __attribute__((__unused__)), int select __attribute__((__unused__)),
     433                               char *data __attribute__((__unused__)))
    441434{
    442   fd = fd;
    443   escalade_port = escalade_port;
    444   command = command;
    445   select = select;
    446   data = data;
    447435  return -1;
    448436}
    449437
    450438
    451439
    452440
    453 int marvell_command_interface(int fd, smart_command_set command,
    454                       int select, char *data)
     441int marvell_command_interface(int fd __attribute__((__unused__)), smart_command_set command __attribute__((__unused__)),
     442                      int select __attribute__((__unused__)), char *data __attribute__((__unused__)))
    455443{
    456   fd = fd;
    457   command = command;
    458   select = select;
    459   data = data;
    460444  return -1;
    461445}
    462446
    463 int highpoint_command_interface(int fd, smart_command_set command, int select, char *data)
     447int highpoint_command_interface(int fd __attribute__((__unused__)), smart_command_set command __attribute__((__unused__)), int select __attribute__((__unused__)), char *data __attribute__((__unused__)))
    464448{
    465   fd = fd;
    466   command = command;
    467   select = select;
    468   data = data;
    469449  return -1;
    470450}
    471451
    472452// Interface to SCSI devices.  See os_linux.c
    473 int do_scsi_cmnd_io(int fd, struct scsi_cmnd_io * iop, int report) {
    474   fd = fd;
    475   iop = iop;
    476   report = report;
     453int do_scsi_cmnd_io(int fd __attribute__((__unused__)), struct scsi_cmnd_io * iop __attribute__((__unused__)), int report __attribute__((__unused__))) {
    477454  return -ENOSYS;
    478455}