Lower default -Wtrunction= level to 1

This commit is contained in:
Rangi42
2025-10-13 11:48:33 -04:00
parent aa672bbec9
commit 64bcef99bd
6 changed files with 7 additions and 15 deletions

View File

@@ -460,10 +460,10 @@ or
.Fl Wno-truncation
disables this warning.
.Fl Wtruncation=1
warns when an N-bit value is 2**N or greater, or less than -2**N.
.Fl Wtruncation=2
or just
.Fl Wtruncation
warns when an N-bit value is 2**N or greater, or less than -2**N.
.Fl Wtruncation=2
also warns when an N-bit value is less than -2**(N-1), which will not fit in two's complement encoding.
.It Fl Wunmapped-char=
Warn when a character goes through charmap conversion but has no defined mapping.

View File

@@ -327,10 +327,10 @@ or
.Fl Wno-truncation
disables this warning.
.Fl Wtruncation=1
warns when an N-bit value is 2**N or greater, or less than -2**N.
.Fl Wtruncation=2
or just
.Fl Wtruncation
warns when an N-bit value is 2**N or greater, or less than -2**N.
.Fl Wtruncation=2
also warns when an N-bit value is less than -2**(N-1), which will not fit in two's complement encoding.
.El
.Sh EXAMPLES