My guess is that you’re using C99 or C++11 coding standards, right?
The static code analysis is not compatible by default with this, which is causing these error markers.
You can change this by going to your project Properties > C/C++ General > Preprocessor Include Paths, Macros, etc. page.
Then select the Providers page, and pick the Legato Linux GCC Built-in compiler settings entry in the list.
Then add the -std=c++11 option to the command line, as shown in the picture below:
Then close the dialog, and trigger right-click > Index > Rebuild then right-click > Run C/C++ Analysis on your project.
The analysis errors should disappear.
Please note that from distributions based on a Yocto 2.2 version, this standard is enabled by default in GCC, and there is no need to upgrade the settings in Developer Studio.
(At the moment (January 2018), the only release in that case is Release 7(Legato 17.11) for WP76 and WP77)