diff options
| author | Andrew Stormont <astormont@racktopsystems.com> | 2019-01-05 11:55:30 +0000 |
|---|---|---|
| committer | Andrew Stormont <astormont@racktopsystems.com> | 2019-10-12 14:42:48 +0000 |
| commit | 8e0c82482ca0deab087522e43df87919b37037f3 (patch) | |
| tree | a35315e9fe4f86b3364d0daeebfaf84e4f3ec41f /usr/src/lib/sun_fc | |
| parent | ebc5aadbbe5490fb3d00525924989d180fff369d (diff) | |
| download | illumos-joyent-8e0c82482ca0deab087522e43df87919b37037f3.tar.gz | |
10178 Enable compiler warnings when building C++ code
Reviewed by: Matthias Scheler <matthias.scheler@wdc.com>
Reviewed by: Andy Fiddaman <omnios@citrus-it.co.uk>
Reviewed by: Toomas Soome <tsoome@me.com>
Approved by: Dan McDonald <danmcd@joyent.com>
Diffstat (limited to 'usr/src/lib/sun_fc')
| -rw-r--r-- | usr/src/lib/sun_fc/Makefile.com | 12 | ||||
| -rw-r--r-- | usr/src/lib/sun_fc/common/FCHBAPort.cc | 4 | ||||
| -rw-r--r-- | usr/src/lib/sun_fc/common/Lockable.cc | 3 |
3 files changed, 17 insertions, 2 deletions
diff --git a/usr/src/lib/sun_fc/Makefile.com b/usr/src/lib/sun_fc/Makefile.com index 7eb64ad1b5..68de7967ed 100644 --- a/usr/src/lib/sun_fc/Makefile.com +++ b/usr/src/lib/sun_fc/Makefile.com @@ -22,6 +22,7 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright 2019 RackTop Systems. # LIBRARYCCC = libsun_fc.a @@ -137,6 +138,17 @@ CCFLAGS64 += -D_POSIX_PTHREAD_SEMANTICS CCFLAGS64 += -compat=5 -_g++=-std=c++98 CPPFLAGS += $(INCS) -DBUILD_TIME='"Wed Sep 24 12:00:00 2008"' +CCERRWARN += -_gcc=-Wno-reorder +CCERRWARN += -_gcc=-Wno-unused-variable +CCERRWARN += -_gcc=-Wno-unused-value +CCERRWARN += -_gcc=-Wno-unused-function +CCERRWARN += -_gcc=-Wno-type-limits +CCERRWARN += -_gcc=-Wno-return-type + +CCERRWARN += -_gcc7=-Wno-c++11-compat +CCERRWARN += -_gcc8=-Wno-c++11-compat +CCERRWARN += -_gcc9=-Wno-c++11-compat + LDLIBS += -ldevinfo LDLIBS += -lsysevent LDLIBS += -lnvpair diff --git a/usr/src/lib/sun_fc/common/FCHBAPort.cc b/usr/src/lib/sun_fc/common/FCHBAPort.cc index 01caf87912..eca3b8aa34 100644 --- a/usr/src/lib/sun_fc/common/FCHBAPort.cc +++ b/usr/src/lib/sun_fc/common/FCHBAPort.cc @@ -21,6 +21,8 @@ /* * Copyright 2010 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. + * + * Copyright 2019 RackTop Systems. */ @@ -305,7 +307,6 @@ void FCHBAPort::sendSCSIPassThru(struct fcp_scsi_cmd *fscsi, Trace log("FCHBAPort::sendSCSIPassThru"); int fd; HBA_STATUS ret; - int count; char fcioErrorString[MAX_FCIO_MSG_LEN] = ""; hrtime_t start; hrtime_t end; @@ -325,7 +326,6 @@ void FCHBAPort::sendSCSIPassThru(struct fcp_scsi_cmd *fscsi, fscsi->scsi_fc_port_num = instanceNumber; fd = HBA::_open(FCP_DRIVER_PATH, O_RDONLY | O_NDELAY); - count = 0; ioctl_errno = 0; if (ioctl(fd, FCP_TGT_SEND_SCSI, fscsi) != 0) { diff --git a/usr/src/lib/sun_fc/common/Lockable.cc b/usr/src/lib/sun_fc/common/Lockable.cc index e6ca1c160b..e0a533aeee 100644 --- a/usr/src/lib/sun_fc/common/Lockable.cc +++ b/usr/src/lib/sun_fc/common/Lockable.cc @@ -21,6 +21,8 @@ /* * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. + * + * Copyright 2019 RackTop Systems. */ @@ -111,6 +113,7 @@ void Lockable::lock(pthread_mutex_t *myMutex) { break; case ENOTRECOVERABLE: cerr << "Lock failed: not recoverable" << endl; + /* FALLTHROUGH */ default: if (loop > DEADLOCK_WARNING) { cerr << "Lock failed: " <<strerror(status) << endl; |
