These changes affect only BrainFlow developers and contributors to C++ code

Warnings as Errors in CI

Recently we fixed all warnings on default level, it also includes 3rd party libraries which we use as dependencies. From now on in CI pipelines C++ code compiled with warnings as errors option. If you create a PR, it’s up to you to ensure that all warnings fixed. To enable this check locally in CMake you need to turn on option WARNINGS_AS_ERRORS.

Example for Windows:

cmake -DWARNINGS_AS_ERRORS=ON -G "Visual Studio 16 2019" -A x64 -DCMAKE_SYSTEM_VERSION=8.1 -DCMAKE_INSTALL_PREFIX=..\installed64\ ..

Example for Unix:


CppCheck Static Analyzer

CppCheck is a tool for static analysis of C++ code, it helps a lot to fix potential memory errors and other bugs. Using valgrind we check only code paths which are executed in runtime, and we can not cover all potential cases this way. CppCheck finds errors analysing code statically and can find edge case issues.

If you see that CI pipeline for CppCheck Job failed, you need to download artifacts from your job( file), extract it and open index.html file.


Check and fix all errors from this list and update PR. You can also click at exact line of code and see error description.