Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Oct 2013 21:41:36 +0000 (UTC)
From:      Alan Somers <asomers@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r256462 - projects/zfsd/head/cddl/sbin/zfsd
Message-ID:  <201310142141.r9ELfa08077330@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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    -------------------------------*/
 /**



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201310142141.r9ELfa08077330>