help / color / Atom feed
* Re: Dirty compile with GCC 7.5
       [not found] <CAH8yC8msGm=OZiGYVp0hr9AG9L1hPzHBVp5OCfSUO1M=P3ZQqw@mail.gmail.com>
@ 2020-07-02 17:21 ` Ingo Schwarze
  0 siblings, 0 replies; only message in thread
From: Ingo Schwarze @ 2020-07-02 17:21 UTC (permalink / raw)
  To: Jeffrey Walton; +Cc: discuss

Hi Jeffrey,

Jeffrey Walton wrote on Thu, Jul 02, 2020 at 01:27:47AM -0400:

> tbl_html.c: In function "print_tbl":
> tbl_html.c:191:9: warning: "%d" directive output may be truncated
> writing between 1 and 10 bytes into a region of size 4
> [-Wformat-truncation=]
>         "%d", dp->hspans + 1);
>          ^~
> tbl_html.c:191:8: note: directive argument in the range [2, 2147483647]
>         "%d", dp->hspans + 1);
>         ^~~~

That's an obvious false positive from the compiler.
The number of spans cannot reasonably be larger than about ten.
If there are more than 9999 spans, well, then a smaller number will
be written into the "colspan" HTML attribute, which is perfectly
harmless.  A document containing a table with so many spans makes
no sense in the first place.

The code is explicitly annotated as


meaning that it was audited and it was determined that truncation
is harmless.

So, what is your point?

You failed to say why you reported this.

Do you suspect a bug?
If so, what do you think could go wrong?

 To unsubscribe send an email to discuss+unsubscribe@mandoc.bsd.lv

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CAH8yC8msGm=OZiGYVp0hr9AG9L1hPzHBVp5OCfSUO1M=P3ZQqw@mail.gmail.com>
2020-07-02 17:21 ` Dirty compile with GCC 7.5 Ingo Schwarze


Archives are clonable: git clone --mirror http://inbox.vuxu.org/mandoc-discuss

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git