svn commit: r256462 - projects/zfsd/head/cddl/sbin/zfsd

Alan Somers asomers at FreeBSD.org
Mon Oct 14 21:41:36 UTC 2013


Author: asomers
Date: Mon Oct 14 21:41:36 2013
New Revision: 256462
URL: http://svnweb.freebsd.org/changeset/base/256462

Log:
  Make zfsd WARNS=1 safe.
  
  	cddl/sbin/zfsd/zfsd.h
  		Make Reader's destructor virtual, because it has virtual
  		functions
  
  	cddl/sbin/zfsd/Makefile
  		Add WARNS=1 and -Wall
  
  Submitted by:	will
  Approved by:	ken (mentor)
  Sponsored by:	Spectra Logic Corporation

Modified:
  projects/zfsd/head/cddl/sbin/zfsd/Makefile
  projects/zfsd/head/cddl/sbin/zfsd/zfsd.h

Modified: projects/zfsd/head/cddl/sbin/zfsd/Makefile
==============================================================================
--- projects/zfsd/head/cddl/sbin/zfsd/Makefile	Mon Oct 14 21:34:49 2013	(r256461)
+++ projects/zfsd/head/cddl/sbin/zfsd/Makefile	Mon Oct 14 21:41:36 2013	(r256462)
@@ -14,7 +14,7 @@ SRCS=		callout.cc		\
 
 NO_MAN=		YES
 
-WARNS?=		0
+WARNS?=		1
 
 INCFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzpool/common
 INCFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris/include
@@ -30,7 +30,7 @@ INCFLAGS+= -I${.CURDIR}/../../../sys/cdd
 INCFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs
 INCFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/sys
 
-CFLAGS= -g -DNEED_SOLARIS_BOOLEAN ${INCFLAGS}
+CFLAGS= -Wall -g -DNEED_SOLARIS_BOOLEAN ${INCFLAGS}
 
 DPADD=  ${LIBZFS} ${LIBUTIL} ${LIBGEOM} ${LIBBSDXML} ${LIBSBUF} \
 	${LIBNVPAIR} ${LIBUUTIL}

Modified: projects/zfsd/head/cddl/sbin/zfsd/zfsd.h
==============================================================================
--- projects/zfsd/head/cddl/sbin/zfsd/zfsd.h	Mon Oct 14 21:34:49 2013	(r256461)
+++ projects/zfsd/head/cddl/sbin/zfsd/zfsd.h	Mon Oct 14 21:41:36 2013	(r256462)
@@ -108,8 +108,12 @@ public:
 	 * \returns      Amount of data that was actually read
 	 */
 	virtual ssize_t read(char* buf, size_t count) = 0;
+
+	virtual ~Reader() = 0;
 };
 
+inline Reader::~Reader() {}
+
 
 /*-------------------------------- FDReader    -------------------------------*/
 /**


More information about the svn-src-projects mailing list