]> granicus.if.org Git - graphviz/log
graphviz
3 years agonewpos: abbreviate some accumulation
Matthew Fernandez [Fri, 10 Sep 2021 01:01:58 +0000 (18:01 -0700)]
newpos: abbreviate some accumulation

3 years agoareaOf: reflow some text
Matthew Fernandez [Fri, 10 Sep 2021 01:00:50 +0000 (18:00 -0700)]
areaOf: reflow some text

3 years agocountOverlap: reflow some text
Matthew Fernandez [Fri, 10 Sep 2021 00:59:47 +0000 (17:59 -0700)]
countOverlap: reflow some text

3 years agogeomUpdate: rephrase and condense some open coded fmax/fmin
Matthew Fernandez [Fri, 10 Sep 2021 00:57:07 +0000 (17:57 -0700)]
geomUpdate: rephrase and condense some open coded fmax/fmin

3 years agoscomp: remove unnecessary brackets
Matthew Fernandez [Fri, 10 Sep 2021 00:53:49 +0000 (17:53 -0700)]
scomp: remove unnecessary brackets

3 years agochkBoundBox: rephrase and condense some open coded fmax/fmin
Matthew Fernandez [Fri, 10 Sep 2021 00:52:21 +0000 (17:52 -0700)]
chkBoundBox: rephrase and condense some open coded fmax/fmin

3 years agoMerge branch 'smattr/210FD7B7-14C5-437F-BD2D-064D7A0B0026' into 'main'
Matthew Fernandez [Wed, 15 Sep 2021 14:44:29 +0000 (14:44 +0000)]
Merge branch 'smattr/210FD7B7-14C5-437F-BD2D-064D7A0B0026' into 'main'

fix: do not overwrite exparse.h during MSBuild compilation

See merge request graphviz/graphviz!2163

3 years agofix: do not overwrite exparse.h during MSBuild compilation
Matthew Fernandez [Wed, 15 Sep 2021 00:14:10 +0000 (17:14 -0700)]
fix: do not overwrite exparse.h during MSBuild compilation

Commit 09973560cc67c5277df8732ebba75da784afbe51 altered exparse.h to be a static
checked-in file instead of generated by Bison. This passed CI testing, but
unfortunately it was not noticed that on Windows MSBuild this resulted in the
build process still generating exparse.h and overwriting the in-repo copy.

This change reverts the Bison command used during MSBuild to generate the
default y.tab.c/y.tab.h output, more closely aligning it with the other build
systems.

3 years agoMerge branch 'smattr/4B281EFC-D08A-45E1-BAE8-5A2DE694D6E5' into 'main'
Matthew Fernandez [Tue, 14 Sep 2021 15:50:52 +0000 (15:50 +0000)]
Merge branch 'smattr/4B281EFC-D08A-45E1-BAE8-5A2DE694D6E5' into 'main'

smyrna: remove trackball code

See merge request graphviz/graphviz!2159

3 years agosmyrna: remove trackball code
Matthew Fernandez [Mon, 13 Sep 2021 04:45:33 +0000 (21:45 -0700)]
smyrna: remove trackball code

Nothing in the code base uses this.

3 years agoMerge branch 'smattr/64a6a7d8-d61a-406c-9491-4e7105d1a880' into 'main'
Matthew Fernandez [Tue, 14 Sep 2021 14:50:46 +0000 (14:50 +0000)]
Merge branch 'smattr/64a6a7d8-d61a-406c-9491-4e7105d1a880' into 'main'

CMake: generate gzipped man pages if possible

Closes #1883

See merge request graphviz/graphviz!2162

3 years agoCMake: generate gzipped man pages if possible
Matthew Fernandez [Tue, 14 Sep 2021 02:57:46 +0000 (19:57 -0700)]
CMake: generate gzipped man pages if possible

On most platforms, man has built in support for reading gzipped man pages so it
is an advantage to compress these at build time to reduce Graphviz’ on-disk
footprint.

Closes #1883.

3 years agoMerge branch 'smattr/790ff9fb-e333-430a-bbbf-8805c62a12d6' into 'main'
Matthew Fernandez [Mon, 13 Sep 2021 15:49:49 +0000 (15:49 +0000)]
Merge branch 'smattr/790ff9fb-e333-430a-bbbf-8805c62a12d6' into 'main'

sed-removal motivated changes

See merge request graphviz/graphviz!2144

3 years agostop re-enabling '-Wall' with --enable-debug
Matthew Fernandez [Mon, 6 Sep 2021 00:34:07 +0000 (17:34 -0700)]
stop re-enabling '-Wall' with --enable-debug

In commit 7d0a6af5edd4cd1408f04548bc0e49cf8dfa5ac2 that added this code, it is
not clear what the purpose of this was. Compiler warnings and more-debuggable
compiler outputs are completely orthogonal things. Now configure.ac
unconditionally enables `-Wall` earlier so this code is redundant.

3 years agostop attempting to suppress double '-O?' with --enable-debug
Matthew Fernandez [Mon, 6 Sep 2021 00:31:49 +0000 (17:31 -0700)]
stop attempting to suppress double '-O?' with --enable-debug

Similar to the prior commit, there is little advantage to these error prone
gymnastics when the compiler is perfectly happy to let a later option supersede
an earlier one. Note that for compilers that are not GCC or ICC, this means
there optimization flags are no longer altered when passing `--enable-debug`.

Related to #2115.

3 years agostop attempting to suppress double '-g' with --enable-debug
Matthew Fernandez [Mon, 6 Sep 2021 00:23:40 +0000 (17:23 -0700)]
stop attempting to suppress double '-g' with --enable-debug

This reverts part of 3b7da5bc0345872efcf011c9c614cc27f82b9998. It is unclear
whether this was a typo or just an insufficiently scoped attempt to clean up
build flags. Of the problems with this code, the main ones were:

  1. It seems somewhat purposeless to suppress `-g` only to just re-add it. GCC
     and ICC can both cope with duplicate `-g` options. It seems purely
     aesthetically-motivated gymnastics to try and pass the compiler a sole
     `-g`.

  2. The scope of things that matched this replacement was too wide. For
     example, a `-ggdb` option would be mangled into `gdb` which is almost
     certainly not what the user intended and would result in cryptic build
     errors. Something like `-fprofile-generate` would be mangled into
     `-fprofileenerate` resulting in similarly confusing build errors.

Related to #2115.

3 years agoremove Guile hack for SWIG-generated code
Matthew Fernandez [Sun, 5 Sep 2021 23:43:44 +0000 (16:43 -0700)]
remove Guile hack for SWIG-generated code

This effectively reverts 34d39968f1412986c90f800db7a9f816e0c0d35a. So called
“Guile GH” that this code was attempting to work around was removed from SWIG in
SWIG commit b819d2a91e951508cf84dc2d78fc7d57391c9dca in 2013. This made it into
SWIG release 2.0.10 also in 2013.

Related to #2115.

3 years agortest.py: avoid the use of sed
Matthew Fernandez [Sun, 5 Sep 2021 23:24:05 +0000 (16:24 -0700)]
rtest.py: avoid the use of sed

Related to #2115.

3 years agogvtest.py: also allow 'dst' parameter to be a string
Matthew Fernandez [Sun, 5 Sep 2021 23:23:18 +0000 (16:23 -0700)]
gvtest.py: also allow 'dst' parameter to be a string

Allowing both `pathlib.Path` and string is more consistent with what 'dst' can
be within this function.

3 years agogvtest.py: fix: use os.remove instead of pathlib.unlink to remove a file
Matthew Fernandez [Sun, 5 Sep 2021 22:56:27 +0000 (15:56 -0700)]
gvtest.py: fix: use os.remove instead of pathlib.unlink to remove a file

There were two problems with using pathlib.unlink here:

  1. If the caller did not pass in a value for `dst`, it was assigned to the
     second return value of a `tempfile.mkstemp` call. That is, `dst` would be a
     string, not a `pathlib.Path`, and calling `.unlink()` would fail
     cryptically.

  2. The `missing_ok` parameter which this code was using was only added to
     `pathlib.unlink` in Python 3.8. The stated Python baseline for Graphviz
     currently is Python 3.6. If this code was reached with Python < 3.8 it
     would result in an exception, obscuring the original problem.

3 years agoMerge branch 'smattr/B74C4F78-BCD7-4583-AF1E-08B7BB49E964' into 'main'
Matthew Fernandez [Mon, 13 Sep 2021 14:43:00 +0000 (14:43 +0000)]
Merge branch 'smattr/B74C4F78-BCD7-4583-AF1E-08B7BB49E964' into 'main'

fix compilation errors with Bison 3.8

Closes #2127

See merge request graphviz/graphviz!2157

3 years agofix: re-align dotlex’s 'yyerror' with that expected by Bison
Matthew Fernandez [Sun, 12 Sep 2021 21:44:02 +0000 (14:44 -0700)]
fix: re-align dotlex’s 'yyerror' with that expected by Bison

Bison 3.8 now emits a prototype for `yyerror`:¹

  To comply with the latest POSIX standard, in Yacc compatibility mode
  (options `-y`/`--yacc`) Bison now generates prototypes for yyerror and
  yylex.  In some situations, this is breaking compatibility: if the user
  has already declared these functions but with some differences (e.g., to
  declare them as static, or to use specific attributes), the generated
  parser will fail to compile.  To disable these prototypes, #define yyerror
  (to `yyerror`), and likewise for yylex.

Because the generated prototype takes a const parameter,² this prototype
conflicts with the implementation in dotlex.c causing a compilation error.
Rather than the work around suggested by the Bison notes, this change simply
re-aligns `yyerror` with the Bison default.

Fixed #2127.

¹ https://github.com/akimd/bison/blob/master/NEWS
² https://www.gnu.org/software/bison/manual/html_node/Error-Reporting-Function.html

3 years agofix: take a const parameter in 'gmlerror'
Matthew Fernandez [Sun, 12 Sep 2021 21:07:07 +0000 (14:07 -0700)]
fix: take a const parameter in 'gmlerror'

This function does not modify the pointed to data of its argument. However, the
immediate problem this change is addressing is that Bison 3.8 now emits a
prototype for this function:¹

  To comply with the latest POSIX standard, in Yacc compatibility mode
  (options `-y`/`--yacc`) Bison now generates prototypes for yyerror and
  yylex.  In some situations, this is breaking compatibility: if the user
  has already declared these functions but with some differences (e.g., to
  declare them as static, or to use specific attributes), the generated
  parser will fail to compile.  To disable these prototypes, #define yyerror
  (to `yyerror`), and likewise for yylex.

Because the generated prototype takes a const parameter,² these two prototypes
now conflict causing a compilation error. Rather than the work around suggested
by the Bison notes, this change simply re-aligns `gmlerror` with the Bison
default.

Related to #2127.

¹ https://github.com/akimd/bison/blob/master/NEWS
² https://www.gnu.org/software/bison/manual/html_node/Error-Reporting-Function.html

3 years agofix: take a const parameter in 'aagerror'
Matthew Fernandez [Sun, 12 Sep 2021 20:00:00 +0000 (13:00 -0700)]
fix: take a const parameter in 'aagerror'

This function does not modify the pointed to data of its argument. However, the
immediate problem this change is addressing is that Bison 3.8 now emits a
prototype for this function:¹

  To comply with the latest POSIX standard, in Yacc compatibility mode
  (options `-y`/`--yacc`) Bison now generates prototypes for yyerror and
  yylex.  In some situations, this is breaking compatibility: if the user
  has already declared these functions but with some differences (e.g., to
  declare them as static, or to use specific attributes), the generated
  parser will fail to compile.  To disable these prototypes, #define yyerror
  (to `yyerror`), and likewise for yylex.

Because the generated prototype takes a const parameter,² these two prototypes
now conflict causing a compilation error. Rather than the work around suggested
by the Bison notes, this change simply re-aligns `aagerror` with the Bison
default.

Related to #2127.

¹ https://github.com/akimd/bison/blob/master/NEWS
² https://www.gnu.org/software/bison/manual/html_node/Error-Reporting-Function.html

3 years agoexpr trace: remove some unnecessary bracketing
Matthew Fernandez [Sun, 12 Sep 2021 19:00:26 +0000 (12:00 -0700)]
expr trace: remove some unnecessary bracketing

3 years agofix: alter expr’s parser’s prefix and introduce a correct yyerror analogue
Matthew Fernandez [Sun, 12 Sep 2021 18:47:49 +0000 (11:47 -0700)]
fix: alter expr’s parser’s prefix and introduce a correct yyerror analogue

Bison documents the `yyerror` function that is expected to be supplied by the
user as taking a single string argument.¹ However expr’s parser was redirecting
this to `exerror`, a variadic function. This mostly worked out fine, but only
coincidentally due to calling conventions aligning.

In Bison 3.8, prototypes for `yyerror` are now generated:²

  To comply with the latest POSIX standard, in Yacc compatibility mode
  (options `-y`/`--yacc`) Bison now generates prototypes for yyerror and
  yylex.  In some situations, this is breaking compatibility: if the user
  has already declared these functions but with some differences (e.g., to
  declare them as static, or to use specific attributes), the generated
  parser will fail to compile.  To disable these prototypes, #define yyerror
  (to `yyerror`), and likewise for yylex.

This causes compilation failures due to type signature mismatches between the
Bison-generated prototype and the hand written `exerror` prototype. Rather than
apply Bison’s suggested work around, this commit instead changes the prefix used
for this parser and introduces a short trampoline, `ex_error` to handle
differences between the calling conventions. Not only does this fix compilation
errors, but it also makes this code robust against Bison issuing error messages
containing formatting codes (e.g. "%s") which `exerror` would previously have
misinterpreted as directives to unpack further arguments.

Note that this is backwards compatible. That is, the code following these
changes still works with Bison 3.7 series.

Related to #2127.

¹ https://www.gnu.org/software/bison/manual/html_node/Error-Reporting-Function.html
² https://github.com/akimd/bison/blob/master/NEWS

3 years agolib/expr/Makefile.am: remove some commented out lines
Matthew Fernandez [Sun, 12 Sep 2021 18:48:56 +0000 (11:48 -0700)]
lib/expr/Makefile.am: remove some commented out lines

3 years agoMerge branch 'smattr/68B86F65-F677-4E11-B60B-95C2114AAC79' into 'main' 2121-include-graphviz-source-in-svg-file
Matthew Fernandez [Sat, 11 Sep 2021 18:17:47 +0000 (18:17 +0000)]
Merge branch 'smattr/68B86F65-F677-4E11-B60B-95C2114AAC79' into 'main'

remove some legacy CI steps

See merge request graphviz/graphviz!2132

3 years agoremove /etc/redhat-release path in install script
Matthew Fernandez [Wed, 1 Sep 2021 01:56:50 +0000 (18:56 -0700)]
remove /etc/redhat-release path in install script

This is the equivalent of 80ccebe66e71c6da570ea5a27f62c21d8c8e39aa but applied
to the install script. Every Linux distro Graphviz CI now runs on appears to
have an /etc/os-release, so this code is unused.

3 years agoRevert "ensure ID_LIKE is always set on Debian in CI"
Matthew Fernandez [Wed, 1 Sep 2021 01:56:45 +0000 (18:56 -0700)]
Revert "ensure ID_LIKE is always set on Debian in CI"

This reverts the remainder of commit 029acf11d1d9a9eb20eddae84cadb61447da95f3.
There are currently no configured Linux CI jobs that run outside of Docker
containers, so this work around is unnecessary.

3 years agoMerge branch 'smattr/1B5CEE04-220F-4D0C-8A5C-0A16DD97F370' into 'main'
Matthew Fernandez [Sat, 11 Sep 2021 16:33:30 +0000 (16:33 +0000)]
Merge branch 'smattr/1B5CEE04-220F-4D0C-8A5C-0A16DD97F370' into 'main'

-Wfloat-equal based clean up

See merge request graphviz/graphviz!2138

3 years agoglCompSetDraw: remove an unnecessary cast
Matthew Fernandez [Sat, 4 Sep 2021 02:49:17 +0000 (19:49 -0700)]
glCompSetDraw: remove an unnecessary cast

This pointer implicitly coerces.

3 years agoglCompSetNew: remove an open coded NULL
Matthew Fernandez [Sat, 4 Sep 2021 02:49:06 +0000 (19:49 -0700)]
glCompSetNew: remove an open coded NULL

3 years agoglcompset.c: remove excess white space
Matthew Fernandez [Sat, 4 Sep 2021 02:48:34 +0000 (19:48 -0700)]
glcompset.c: remove excess white space

3 years agoglCompSetMouseUp: remove unnecessary cast
Matthew Fernandez [Sat, 4 Sep 2021 01:50:48 +0000 (18:50 -0700)]
glCompSetMouseUp: remove unnecessary cast

This pointer coerces implicitly.

3 years agoglCompSetMouseUp: remove pointless 'static' on locals
Matthew Fernandez [Sat, 4 Sep 2021 01:49:13 +0000 (18:49 -0700)]
glCompSetMouseUp: remove pointless 'static' on locals

The value of these variables retained from prior calls is immediately
overwritten on entry to this function.

3 years agosquarify: replace an exact floating-point comparison
Matthew Fernandez [Sat, 4 Sep 2021 01:29:46 +0000 (18:29 -0700)]
squarify: replace an exact floating-point comparison

In this case, `w` could be `fillrec.size[0]` or `fillrec.size[1]`. Replacing the
exact comparison with `<=` squashes a -Wfloat-equal compiled warning.

3 years agofullArea: remove micro-optimization of 0 value of 'm'
Matthew Fernandez [Sat, 4 Sep 2021 01:23:05 +0000 (18:23 -0700)]
fullArea: remove micro-optimization of 0 value of 'm'

This is no longer necessary on modern compilers/processors where square root is
less expensive and this code is not on a hot path.

3 years agosparse cmp: remove some unnecessary casts
Matthew Fernandez [Sat, 4 Sep 2021 01:08:33 +0000 (18:08 -0700)]
sparse cmp: remove some unnecessary casts

These pointers coerce implicitly.

3 years agosparse cmp: rephrase a comparison to avoid a -Wfloat-equal warning
Matthew Fernandez [Sat, 4 Sep 2021 01:07:41 +0000 (18:07 -0700)]
sparse cmp: rephrase a comparison to avoid a -Wfloat-equal warning

Simply makes it clearer to the compiler what this code is doing.

3 years agooverlapSeg: rephrase the order of comparisons to avoid a -Wfloat-equal warning
Matthew Fernandez [Sat, 4 Sep 2021 01:02:22 +0000 (18:02 -0700)]
overlapSeg: rephrase the order of comparisons to avoid a -Wfloat-equal warning

Simply makes it clearer to the compiler what this code is doing.

3 years agoMerge branch 'smattr/24E8A935-AED9-4957-8832-B2EFADDDED5F' into 'main'
Matthew Fernandez [Fri, 10 Sep 2021 15:46:52 +0000 (15:46 +0000)]
Merge branch 'smattr/24E8A935-AED9-4957-8832-B2EFADDDED5F' into 'main'

-Wmissing-field-initializer warning squashing

See merge request graphviz/graphviz!2139

3 years agop_tab: squash -Wmissing-field-initializer warning
Matthew Fernandez [Sat, 4 Sep 2021 03:12:37 +0000 (20:12 -0700)]
p_tab: squash -Wmissing-field-initializer warning

3 years agop_note: squash -Wmissing-field-initializer warning
Matthew Fernandez [Sat, 4 Sep 2021 03:11:15 +0000 (20:11 -0700)]
p_note: squash -Wmissing-field-initializer warning

3 years agop_octagon: squash -Wmissing-field-initializer warning
Matthew Fernandez [Sat, 4 Sep 2021 03:10:24 +0000 (20:10 -0700)]
p_octagon: squash -Wmissing-field-initializer warning

3 years agop_septagon: squash -Wmissing-field-initializer warning
Matthew Fernandez [Sat, 4 Sep 2021 03:09:40 +0000 (20:09 -0700)]
p_septagon: squash -Wmissing-field-initializer warning

3 years agop_hexagon: squash -Wmissing-field-initializer warning
Matthew Fernandez [Sat, 4 Sep 2021 03:09:08 +0000 (20:09 -0700)]
p_hexagon: squash -Wmissing-field-initializer warning

3 years agop_pentagon: squash -Wmissing-field-initializer warning
Matthew Fernandez [Sat, 4 Sep 2021 03:08:28 +0000 (20:08 -0700)]
p_pentagon: squash -Wmissing-field-initializer warning

3 years agop_house: squash -Wmissing-field-initializer warning
Matthew Fernandez [Sat, 4 Sep 2021 03:07:56 +0000 (20:07 -0700)]
p_house: squash -Wmissing-field-initializer warning

3 years agop_parallelogram: squash -Wmissing-field-initializer warning
Matthew Fernandez [Sat, 4 Sep 2021 03:07:08 +0000 (20:07 -0700)]
p_parallelogram: squash -Wmissing-field-initializer warning

3 years agop_trapezium: squash -Wmissing-field-initializer warning
Matthew Fernandez [Sat, 4 Sep 2021 03:05:48 +0000 (20:05 -0700)]
p_trapezium: squash -Wmissing-field-initializer warning

3 years agop_diamond: squash -Wmissing-field-initializer warning
Matthew Fernandez [Sat, 4 Sep 2021 03:02:12 +0000 (20:02 -0700)]
p_diamond: squash -Wmissing-field-initializer warning

3 years agoMerge branch 'smattr/B7DB66F6-0A3B-4F6B-B334-2888ADA7BFBE' into 'main'
Matthew Fernandez [Fri, 10 Sep 2021 01:23:06 +0000 (01:23 +0000)]
Merge branch 'smattr/B7DB66F6-0A3B-4F6B-B334-2888ADA7BFBE' into 'main'

some graphml2gv, gxl2gv clean up

See merge request graphviz/graphviz!2141

3 years agogxl2gv: remove unnecessary casts of 'userdata' pointers
Matthew Fernandez [Sat, 4 Sep 2021 19:35:15 +0000 (12:35 -0700)]
gxl2gv: remove unnecessary casts of 'userdata' pointers

These implicitly coerce.

3 years agogxl2gv: remove unused struct name
Matthew Fernandez [Sat, 4 Sep 2021 19:35:04 +0000 (12:35 -0700)]
gxl2gv: remove unused struct name

3 years agocharacterDataHandler: remove unnecessary casts of `agxbput_n` arguments
Matthew Fernandez [Sat, 4 Sep 2021 19:34:38 +0000 (12:34 -0700)]
characterDataHandler: remove unnecessary casts of `agxbput_n` arguments

3 years agographml2gv: remove unnecessary casts of `userdata` pointers
Matthew Fernandez [Sat, 4 Sep 2021 19:34:15 +0000 (12:34 -0700)]
graphml2gv: remove unnecessary casts of `userdata` pointers

These implicitly coerce.

3 years agographml2gv: remove unused struct name
Matthew Fernandez [Sat, 4 Sep 2021 19:33:53 +0000 (12:33 -0700)]
graphml2gv: remove unused struct name

3 years agoMerge branch 'smattr/bb628679-594c-4502-a50b-9e32e5ed7316' into 'main'
Matthew Fernandez [Thu, 9 Sep 2021 15:28:45 +0000 (15:28 +0000)]
Merge branch 'smattr/bb628679-594c-4502-a50b-9e32e5ed7316' into 'main'

neatogen warning squashing

See merge request graphviz/graphviz!2146

3 years agoneatogen multispline freeIpair: squash a -Wunused-parameter compiler warning
Matthew Fernandez [Mon, 6 Sep 2021 19:41:25 +0000 (12:41 -0700)]
neatogen multispline freeIpair: squash a -Wunused-parameter compiler warning

3 years agoneatogen multispline newIpair: squash a -Wunused-parameter compiler warning
Matthew Fernandez [Mon, 6 Sep 2021 19:40:49 +0000 (12:40 -0700)]
neatogen multispline newIpair: squash a -Wunused-parameter compiler warning

3 years agoneatogen multispline freeItem: squash -Wunused-parameter compiler warnings
Matthew Fernandez [Mon, 6 Sep 2021 19:39:34 +0000 (12:39 -0700)]
neatogen multispline freeItem: squash -Wunused-parameter compiler warnings

3 years agoneatogen multipline newItem: squash a -Wunused-parameter compiler warning
Matthew Fernandez [Mon, 6 Sep 2021 19:38:42 +0000 (12:38 -0700)]
neatogen multipline newItem: squash a -Wunused-parameter compiler warning

3 years agoneatogen multispline swap_ends_p: squash a -Wunused-parameter compiler warning
Matthew Fernandez [Mon, 6 Sep 2021 19:37:49 +0000 (12:37 -0700)]
neatogen multispline swap_ends_p: squash a -Wunused-parameter compiler warning

3 years agoneatogen multispline spline_merge: squash a -Wunused-parameter compiler warning
Matthew Fernandez [Mon, 6 Sep 2021 19:37:00 +0000 (12:37 -0700)]
neatogen multispline spline_merge: squash a -Wunused-parameter compiler warning

3 years agoneatogen multispline: squash a -Wmissing-field-initializer warning
Matthew Fernandez [Mon, 6 Sep 2021 19:36:02 +0000 (12:36 -0700)]
neatogen multispline: squash a -Wmissing-field-initializer warning

3 years agomakeObstacle: squash a spurious -Wswitch-default compiler warning
Matthew Fernandez [Mon, 6 Sep 2021 19:56:58 +0000 (12:56 -0700)]
makeObstacle: squash a spurious -Wswitch-default compiler warning

The surrounding context ensures that the cases in this switch cover every
possibility.

3 years agoneatogen cmpitems: squash -Wunused-parameter compiler warnings
Matthew Fernandez [Mon, 6 Sep 2021 19:55:15 +0000 (12:55 -0700)]
neatogen cmpitems: squash -Wunused-parameter compiler warnings

3 years agoneatogen cmpitems: rephrase to avoid double→int conversion
Matthew Fernandez [Mon, 6 Sep 2021 19:53:39 +0000 (12:53 -0700)]
neatogen cmpitems: rephrase to avoid double→int conversion

This had a number of problems with respect to possible overflow and loss of
precision. This commit rephrases the comparison into something that does not
rely on any coercion or conversion.

3 years agoneatogen freeitem: squash -Wunused-parameter compiler warnings
Matthew Fernandez [Mon, 6 Sep 2021 19:49:57 +0000 (12:49 -0700)]
neatogen freeitem: squash -Wunused-parameter compiler warnings

3 years agoneatogen newitem: squash a -Wunused-parameter compiler warning
Matthew Fernandez [Mon, 6 Sep 2021 19:49:28 +0000 (12:49 -0700)]
neatogen newitem: squash a -Wunused-parameter compiler warning

3 years agoneatogen swap_ends_p: squash a -Wunused-parameter warning
Matthew Fernandez [Mon, 6 Sep 2021 19:48:08 +0000 (12:48 -0700)]
neatogen swap_ends_p: squash a -Wunused-parameter warning

3 years agoneatogen spline_merge: squash a -Wunused-parameter compiler warning
Matthew Fernandez [Mon, 6 Sep 2021 19:47:40 +0000 (12:47 -0700)]
neatogen spline_merge: squash a -Wunused-parameter compiler warning

3 years agofind_closest_pairs: squash a -Wmissing-field-initializer compiler warning
Matthew Fernandez [Mon, 6 Sep 2021 19:26:35 +0000 (12:26 -0700)]
find_closest_pairs: squash a -Wmissing-field-initializer compiler warning

3 years agoneatogen splineInfo: squash a -Wmissing-field-initializer compiler warning
Matthew Fernandez [Mon, 6 Sep 2021 19:24:17 +0000 (12:24 -0700)]
neatogen splineInfo: squash a -Wmissing-field-initializer compiler warning

3 years agodotgen splineInfo: squash a -Wmissing-field-initializer compiler warning
Matthew Fernandez [Mon, 6 Sep 2021 19:22:30 +0000 (12:22 -0700)]
dotgen splineInfo: squash a -Wmissing-field-initializer compiler warning

3 years agoMerge branch 'smattr/659C49B6-0A1A-4490-B1DD-DE326B38C850' into 'main'
Matthew Fernandez [Thu, 9 Sep 2021 04:24:54 +0000 (04:24 +0000)]
Merge branch 'smattr/659C49B6-0A1A-4490-B1DD-DE326B38C850' into 'main'

clean up in tcldot

See merge request graphviz/graphviz!2145

3 years agotcldot-io.c: remove unnecessary bracketing
Matthew Fernandez [Mon, 6 Sep 2021 18:26:55 +0000 (11:26 -0700)]
tcldot-io.c: remove unnecessary bracketing

3 years agotcldot myiodisc_memiofread: remove unnecessary cast
Matthew Fernandez [Mon, 6 Sep 2021 18:25:32 +0000 (11:25 -0700)]
tcldot myiodisc_memiofread: remove unnecessary cast

This pointer implicitly coerces.

3 years agotcldot-io.c: remove commented out code
Matthew Fernandez [Mon, 6 Sep 2021 18:25:12 +0000 (11:25 -0700)]
tcldot-io.c: remove commented out code

3 years agotcldot myiddisc_idregister: squash a spurious -Wswitch-default compiler warning
Matthew Fernandez [Mon, 6 Sep 2021 18:21:20 +0000 (11:21 -0700)]
tcldot myiddisc_idregister: squash a spurious -Wswitch-default compiler warning

3 years agotcldot-id.c: remove unnecessary casts of state pointers
Matthew Fernandez [Mon, 6 Sep 2021 18:20:11 +0000 (11:20 -0700)]
tcldot-id.c: remove unnecessary casts of state pointers

These pointers implicitly coerce.

3 years agotcldot: myiddisc_free: squash a -Wunused-parameter compiler warning
Matthew Fernandez [Mon, 6 Sep 2021 18:19:11 +0000 (11:19 -0700)]
tcldot: myiddisc_free: squash a -Wunused-parameter compiler warning

3 years agotcldot myiddisc_map: squash a -Wunused-parameter compiler warning
Matthew Fernandez [Mon, 6 Sep 2021 18:18:51 +0000 (11:18 -0700)]
tcldot myiddisc_map: squash a -Wunused-parameter compiler warning

3 years agotcldot myagxset: use a 'size_t' for string length instead of 'int'
Matthew Fernandez [Mon, 6 Sep 2021 18:15:37 +0000 (11:15 -0700)]
tcldot myagxset: use a 'size_t' for string length instead of 'int'

Squashes a -Wconversion compiler warning.

3 years agotcldot deleteNode: squash a -Wunused-parameter compiler warning
Matthew Fernandez [Mon, 6 Sep 2021 18:14:42 +0000 (11:14 -0700)]
tcldot deleteNode: squash a -Wunused-parameter compiler warning

3 years agotcldot deleteEdge: squash a -Wunused-parameter compiler warning
Matthew Fernandez [Mon, 6 Sep 2021 18:14:05 +0000 (11:14 -0700)]
tcldot deleteEdge: squash a -Wunused-parameter compiler warning

3 years agotcldot obj2cmd: squash a spurious -Wswitch-default compiler warning
Matthew Fernandez [Mon, 6 Sep 2021 18:12:30 +0000 (11:12 -0700)]
tcldot obj2cmd: squash a spurious -Wswitch-default compiler warning

3 years agoTcldot_string_writer: remove unnecessary cast
Matthew Fernandez [Mon, 6 Sep 2021 18:12:13 +0000 (11:12 -0700)]
Tcldot_string_writer: remove unnecessary cast

This pointer implicitly coerces.

3 years agoMerge branch 'smattr/DD0814CF-B2A0-4318-A2E6-A7F84616387A' into 'main'
Matthew Fernandez [Thu, 9 Sep 2021 03:13:07 +0000 (03:13 +0000)]
Merge branch 'smattr/DD0814CF-B2A0-4318-A2E6-A7F84616387A' into 'main'

fix remaining Pylint warnings; enabling gating Pylint CI check

See merge request graphviz/graphviz!2140

3 years agomake final Pylint step fail for any non-FIXME warning/error
Matthew Fernandez [Sat, 4 Sep 2021 16:50:03 +0000 (09:50 -0700)]
make final Pylint step fail for any non-FIXME warning/error

The gating Pylint check now fails if any warning or error is detected, excluding
FIXME comments. This should hopefully lead to improved code quality in Python
introduced into the code base in future.

3 years agodisable Pylint duplicate-code warning
Matthew Fernandez [Sat, 4 Sep 2021 17:12:05 +0000 (10:12 -0700)]
disable Pylint duplicate-code warning

This triggers for a lot of Graphviz Python code because, by its nature of being
used to write test cases in Graphviz, there is inherently always going to be a
lot of similar looking code.

3 years agovuln.py: address a Pylint missing-function-docstring warning
Matthew Fernandez [Sat, 4 Sep 2021 16:47:28 +0000 (09:47 -0700)]
vuln.py: address a Pylint missing-function-docstring warning

3 years agoshapes.py: address a Pylint missing-function-docstring warning
Matthew Fernandez [Sat, 4 Sep 2021 16:47:12 +0000 (09:47 -0700)]
shapes.py: address a Pylint missing-function-docstring warning

3 years agosilence Pylint import-errors about regression_test_helpers
Matthew Fernandez [Sat, 4 Sep 2021 16:45:17 +0000 (09:45 -0700)]
silence Pylint import-errors about regression_test_helpers

I do not know why, but Pylint does not understand this import while Python
itself does. I have tried different variations, but Pylint complains about all
of them.

3 years agoregression_test_helpers.py: address a Pylint missing-function-docstring warning
Matthew Fernandez [Sat, 4 Sep 2021 16:38:41 +0000 (09:38 -0700)]
regression_test_helpers.py: address a Pylint missing-function-docstring warning

3 years agovuln.py: remove variable shadowing
Matthew Fernandez [Sat, 4 Sep 2021 16:32:48 +0000 (09:32 -0700)]
vuln.py: remove variable shadowing

3 years agoaddress Pylint missing-module-docstring warnings
Matthew Fernandez [Sat, 4 Sep 2021 16:32:26 +0000 (09:32 -0700)]
address Pylint missing-module-docstring warnings

3 years agotest_regression.py: remove unused 'stdout' variable
Matthew Fernandez [Sat, 4 Sep 2021 16:28:25 +0000 (09:28 -0700)]
test_regression.py: remove unused 'stdout' variable

3 years agochkPos: remove strcmp micro-optimization
Matthew Fernandez [Sat, 4 Sep 2021 16:24:19 +0000 (09:24 -0700)]
chkPos: remove strcmp micro-optimization