From fe1bec18ca5d591db86dab1242696b6d70c565ed Mon Sep 17 00:00:00 2001 From: "Alan M. Carroll" Date: Thu, 2 Apr 2020 12:25:00 -0500 Subject: [PATCH] Fix missing virtual destructors. --- swoc++/CMakeLists.txt | 2 +- swoc++/include/swoc/bwf_base.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/swoc++/CMakeLists.txt b/swoc++/CMakeLists.txt index acce6d7..ec2b447 100644 --- a/swoc++/CMakeLists.txt +++ b/swoc++/CMakeLists.txt @@ -46,7 +46,7 @@ set(CC_FILES add_library(swoc++ STATIC ${CC_FILES}) #add_compile_options(-Wall -Wextra -Werror -Wno-unused-parameter -Wno-format-truncation -Wno-stringop-overflow -Wno-invalid-offsetof) -target_compile_options(swoc++ PRIVATE -Wall -Wextra -Werror -Wno-unused-parameter -Wno-format-truncation -Wno-stringop-overflow -Wno-invalid-offsetof) +target_compile_options(swoc++ PRIVATE -Wall -Wextra -Werror -Wnon-virtual-dtor -Wno-unused-parameter -Wno-stringop-overflow) # Not quite sure how this works, but I think it generates one of two paths depending on the context. # That is, the generator functions return non-empty strings only in the corresponding context. diff --git a/swoc++/include/swoc/bwf_base.h b/swoc++/include/swoc/bwf_base.h index af894af..ad732fe 100644 --- a/swoc++/include/swoc/bwf_base.h +++ b/swoc++/include/swoc/bwf_base.h @@ -766,6 +766,8 @@ namespace bwf class ArgPack { public: + virtual ~ArgPack() = default; /// Force virtual destructor for subclasses. + /** Get argument at index @a idx. * * @param idx Argument index.