diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2020-05-24 15:13:45 +0200 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2020-05-27 21:02:38 +0200 |
| commit | 3fa54adf79940efa0515ab9946d1f48cff095cf0 (patch) | |
| tree | 6975bf4aa950dc3c238de37aee1c2e0024bece47 /lib.c | |
| parent | f0fe1cd9e4fe2e937f452561b62c4ab9d0989ece (diff) | |
| download | sparse-dev-3fa54adf79940efa0515ab9946d1f48cff095cf0.tar.gz | |
add an option to suppress warning 'no newline at EOF'
Some platforms have some of their system header files missing the
ending newline. Sparse will then warn about it, again and again,
and more important warnings can easily be lost in the noise.
So, add an option flag '-W[no-]newline-eof' to conditionalize
this warning.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'lib.c')
| -rw-r--r-- | lib.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -272,6 +272,7 @@ int Wenum_mismatch = 1; int Wexternal_function_has_definition = 1; int Wsparse_error = 0; int Wmemcpy_max_count = 1; +int Wnewline_eof = 1; int Wnon_pointer_null = 1; int Wold_initializer = 1; int Wold_style_definition = 1; @@ -761,6 +762,7 @@ static const struct flag warnings[] = { { "int-to-pointer-cast", &Wint_to_pointer_cast }, { "memcpy-max-count", &Wmemcpy_max_count }, { "non-pointer-null", &Wnon_pointer_null }, + { "newline-eof", &Wnewline_eof }, { "old-initializer", &Wold_initializer }, { "old-style-definition", &Wold_style_definition }, { "one-bit-signed-bitfield", &Wone_bit_signed_bitfield }, |
