]> granicus.if.org Git - graphviz/commit
core plugin: suppress 'penwidth' double comparison warning
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 12 Nov 2022 23:50:03 +0000 (15:50 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 13 Nov 2022 20:59:58 +0000 (12:59 -0800)
commitbbbe41a43964a8f258d33aec741a80002f690f31
tree63b862c3b7e46de3908aff7383a696ebe6894a15
parentcf0bd42a1a4318cc0c5f227370dcd246be47da5d
core plugin: suppress 'penwidth' double comparison warning

`gvprintdouble` prints to two decimal places. So we can take this into account
when deciding whether we need to print a non-default pen width, squashing:

  gvrender_core_svg.c: In function ‘svg_grstyle’:
  gvrender_core_svg.c:191:23: warning: comparing floating-point with ‘==’ or
    ‘!=’ is unsafe [-Wfloat-equal]
    191 |     if (obj->penwidth != PENWIDTH_NORMAL) {
        |                       ^~
plugin/core/gvrender_core_svg.c