tools/gn: Fix errors found by Facebook's flint tool.
Example of warnings/errors/advices:
tools/gn/exec_process.h:5: Missing include guard. If you are ABSOLUTELY
sure that you don't want an include guard, then include a comment
containing override-include-guard in lieu of an include guard.
tools/gn/ninja_binary_target_writer.cc:50: Single-argument constructor
'IncludeWriter(PathOutput& path_output)' may inadvertently be used as a
type conversion constructor. Prefix the function with the 'explicit'
keyword to avoid this, or add an /* implicit */ comment to suppress this
warning.
tools/gn/standard_out.cc:98: Advice: Prefer `nullptr' to `NULL' in new
C++ code. Unlike `NULL', `nullptr' can't accidentally be used in
arithmetic or as an integer. See
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2431.pdf for
details.
tools/gn/tutorial/hello.cc:7: The associated header file of .cpp files
should be included before any other includes.
tools/gn/target_generator.h:16: Warning: Base class TargetGenerator has
virtual functions but a public non-virtual destructor.
The errors were found with the following command line:
$ flint --recusive tools/gn
And cleaned up until silenced with:
$ gn gen out-gn
$ ninja -C out-gn gn gn_unittests
BUG=None
TEST=see above
R=scottmg@chromium.org,brettw@chromium.org
Review URL: https://codereview.chromium.org/
964203002
Cr-Commit-Position: refs/heads/master@{#318639}