forked from falcosecurity/falco
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add optional support for -Wextra and -Werror (falcosecurity#479)
The -Wextra compile-time option will enable additional diagnostic warnigns. The -Werror option will cause the compiler to treat warnings as errors. This change adds a build time option, BUILD_WARNINGS_AS_ERRORS, to conditionally enable those flags. Note that depending on the compiler you're using, if you enable this option, compilation may fail (some compiler version have additional warnings that have not yet been resolved). Testing with these options in place identified a destructor that was throwing an exception. C++11 doesn't allow destructors to throw exceptions, so those throw's would have resulted in calls to terminate(). I replace them with an error log and a call to assert().
- Loading branch information
Showing
2 changed files
with
20 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters