]> granicus.if.org Git - graphviz/log
graphviz
2 years agosfdpgen: make 'UniformStressSmoother_new' a static function
Matthew Fernandez [Sat, 23 Jul 2022 15:34:37 +0000 (08:34 -0700)]
sfdpgen: make 'UniformStressSmoother_new' a static function

This function is not used outside of its containing file.

2 years agosfdpgen UniformStressSmoother_new: remove unused 'flag' parameter
Matthew Fernandez [Sat, 23 Jul 2022 15:33:57 +0000 (08:33 -0700)]
sfdpgen UniformStressSmoother_new: remove unused 'flag' parameter

2 years agosfdpgen UniformStressSmoother_new: remove unused 'x' parameter
Matthew Fernandez [Sat, 23 Jul 2022 15:33:02 +0000 (08:33 -0700)]
sfdpgen UniformStressSmoother_new: remove unused 'x' parameter

2 years agosfdpgen UniformStressSmoother_new: remove unused 'dim' parameter
Matthew Fernandez [Sat, 23 Jul 2022 15:31:47 +0000 (08:31 -0700)]
sfdpgen UniformStressSmoother_new: remove unused 'dim' parameter

2 years agosfdpgen stress_model: remove unused 'A' parameter
Matthew Fernandez [Sat, 23 Jul 2022 15:27:30 +0000 (08:27 -0700)]
sfdpgen stress_model: remove unused 'A' parameter

2 years agosfdpgen: make 'get_stress' static
Matthew Fernandez [Sat, 23 Jul 2022 15:22:58 +0000 (08:22 -0700)]
sfdpgen: make 'get_stress' static

This function is unused outside of its containing file and is only used when
`DEBUG_PRINT` is defined.

2 years agosfdpgen get_stress: remove 'weighted' parameter that is always 1
Matthew Fernandez [Sat, 23 Jul 2022 15:21:28 +0000 (08:21 -0700)]
sfdpgen get_stress: remove 'weighted' parameter that is always 1

2 years agosfdpgen get_stress: remove unused 'data' parameter
Matthew Fernandez [Sat, 23 Jul 2022 15:20:17 +0000 (08:20 -0700)]
sfdpgen get_stress: remove unused 'data' parameter

2 years agosfdpgen jacobi: remove unused 'flag' parameter
Matthew Fernandez [Sat, 23 Jul 2022 15:18:15 +0000 (08:18 -0700)]
sfdpgen jacobi: remove unused 'flag' parameter

2 years agoMerge branch 'smattr/45dc48f2-fa91-42ed-8530-8bcaf9fdb303' into 'main'
Matthew Fernandez [Thu, 28 Jul 2022 02:47:23 +0000 (02:47 +0000)]
Merge branch 'smattr/45dc48f2-fa91-42ed-8530-8bcaf9fdb303' into 'main'

neatogen compiler warning squashing

See merge request graphviz/graphviz!2771

2 years agoneatogen call_tri: remove unused 'dim' parameter
Matthew Fernandez [Sat, 23 Jul 2022 01:16:47 +0000 (18:16 -0700)]
neatogen call_tri: remove unused 'dim' parameter

2 years agoneatogen CMDS_orthog: remove unused 'g' parameter
Matthew Fernandez [Sat, 23 Jul 2022 01:10:55 +0000 (18:10 -0700)]
neatogen CMDS_orthog: remove unused 'g' parameter

2 years agoneatogen constrained_majorization_new_with_gaps: remove unused 'ndim' parameter
Matthew Fernandez [Sat, 23 Jul 2022 01:06:16 +0000 (18:06 -0700)]
neatogen constrained_majorization_new_with_gaps: remove unused 'ndim' parameter

Note that the call to this function from
`constrained_majorization_new_with_gaps` also seems confused about the meaning
of its parameters. But no attempt is made to correct this.

2 years agoneatogen: remove unused 'constrained_majorization_gradient_projection'
Matthew Fernandez [Sat, 23 Jul 2022 01:03:59 +0000 (18:03 -0700)]
neatogen: remove unused 'constrained_majorization_gradient_projection'

This function has seemingly never been used.

2 years agoneatogen computeHierarchyBoundaries: remove unused 'n' parameter
Matthew Fernandez [Sat, 23 Jul 2022 00:56:25 +0000 (17:56 -0700)]
neatogen computeHierarchyBoundaries: remove unused 'n' parameter

2 years agoneatogen mkConstraintG: remove unused 'g' parameter
Matthew Fernandez [Sat, 23 Jul 2022 00:45:45 +0000 (17:45 -0700)]
neatogen mkConstraintG: remove unused 'g' parameter

2 years agoneatogen bfs_bounded: remove unused 'n' parameter
Matthew Fernandez [Sat, 23 Jul 2022 00:40:26 +0000 (17:40 -0700)]
neatogen bfs_bounded: remove unused 'n' parameter

2 years agoneatogen initLayout: remove unused 'graph' parameter
Matthew Fernandez [Sat, 23 Jul 2022 00:32:16 +0000 (17:32 -0700)]
neatogen initLayout: remove unused 'graph' parameter

2 years agoneatogen voronoi: remove unused 'triangulate' parameter
Matthew Fernandez [Sat, 23 Jul 2022 00:29:56 +0000 (17:29 -0700)]
neatogen voronoi: remove unused 'triangulate' parameter

2 years agoMerge branch 'smattr/5fa804c5-668e-4a54-b373-00bc933032d5' into 'main'
Matthew Fernandez [Wed, 27 Jul 2022 15:32:13 +0000 (15:32 +0000)]
Merge branch 'smattr/5fa804c5-668e-4a54-b373-00bc933032d5' into 'main'

more compiler warning squashing

See merge request graphviz/graphviz!2770

2 years agosmyrna on_attrAddBtn_clicked: use const type to squash a -Wcast-qual warning
Matthew Fernandez [Fri, 22 Jul 2022 01:45:23 +0000 (18:45 -0700)]
smyrna on_attrAddBtn_clicked: use const type to squash a -Wcast-qual warning

Unfortunately we cannot also do the same for `attr_name` in this function
because it is passed to a Graphviz function that accepts a non-const pointer.

2 years agosmyrna safestrdup: accept a const pointer
Matthew Fernandez [Fri, 22 Jul 2022 01:44:30 +0000 (18:44 -0700)]
smyrna safestrdup: accept a const pointer

This will simplify an upcoming change.

2 years agosmyrna set_refresh_filters: use const types to squash some -Wcast-qual warnings
Matthew Fernandez [Fri, 22 Jul 2022 01:42:18 +0000 (18:42 -0700)]
smyrna set_refresh_filters: use const types to squash some -Wcast-qual warnings

Unfortunately we cannot also do the same for `attr_name` in this function
because it is passed to a Graphviz function that accepts a non-const pointer.

2 years agosmyrna doApply: remove unused 'doAll' code path
Matthew Fernandez [Fri, 22 Jul 2022 01:37:02 +0000 (18:37 -0700)]
smyrna doApply: remove unused 'doAll' code path

2 years agosmyrna doApply: remove unused 'widget' parameter
Matthew Fernandez [Fri, 22 Jul 2022 01:32:52 +0000 (18:32 -0700)]
smyrna doApply: remove unused 'widget' parameter

Note this also makes `widget` unused in `on_attrApplyBtn_clicked` which is a
Glade callback and cannot have its corresponding parameter removed. So we squash
the resulting warning there.

2 years agosmyrna on_attrAddBtn_clicked: squash -Wunused-parameter warnings
Matthew Fernandez [Fri, 22 Jul 2022 01:31:11 +0000 (18:31 -0700)]
smyrna on_attrAddBtn_clicked: squash -Wunused-parameter warnings

55efb8e562bca6c4090a73712342ac006e133704 that squashes other such warnings in
this file missed that these are also unused in `on_attrAddBtn_clicked`.

2 years agosmyrna mOpenSlot: squash -Wunused-parameter warnings
Matthew Fernandez [Fri, 22 Jul 2022 01:27:41 +0000 (18:27 -0700)]
smyrna mOpenSlot: squash -Wunused-parameter warnings

bd869436742887a0089f5ad817ecb36a1546987c that squashed other such warnings in
this file, missed that these are also unused in `mOpenSlot`.

2 years agosmyrna btnToolFit_clicked: use float literals to simplify some code
Matthew Fernandez [Fri, 22 Jul 2022 01:26:15 +0000 (18:26 -0700)]
smyrna btnToolFit_clicked: use float literals to simplify some code

2 years agosmyrna btnToolZoomFit_clicked: rephrase unorthodox ternaries
Matthew Fernandez [Fri, 22 Jul 2022 01:24:25 +0000 (18:24 -0700)]
smyrna btnToolZoomFit_clicked: rephrase unorthodox ternaries

This function was using assignments on the right hand sides of ternary
expressions. This is technically allowed, but leads to very hard to read code.

2 years agosmyrna toolboxcallbacks: remove unnecessary parens
Matthew Fernandez [Fri, 22 Jul 2022 01:20:15 +0000 (18:20 -0700)]
smyrna toolboxcallbacks: remove unnecessary parens

This also adjusts the location of some variable definitions to C99 style.

2 years agosmyrna toolboxcallbacks: remove excess white space
Matthew Fernandez [Fri, 22 Jul 2022 01:18:00 +0000 (18:18 -0700)]
smyrna toolboxcallbacks: remove excess white space

2 years agosmyrna toolboxcallbacks: squash -Wunused-parameter warnings
Matthew Fernandez [Fri, 22 Jul 2022 01:16:34 +0000 (18:16 -0700)]
smyrna toolboxcallbacks: squash -Wunused-parameter warnings

These functions are used as Glade callbacks, so need to conform to particular
type signatures.

2 years agosmyrna topviewsettings: squash -Wunused-parameter warnings
Matthew Fernandez [Fri, 22 Jul 2022 01:14:08 +0000 (18:14 -0700)]
smyrna topviewsettings: squash -Wunused-parameter warnings

These functions are used as Glade callbacks, so need to conform to particular
type signatures.

2 years agosmyrna load_settings_from_graph: remove unused 'g' parameter
Matthew Fernandez [Fri, 22 Jul 2022 01:08:04 +0000 (18:08 -0700)]
smyrna load_settings_from_graph: remove unused 'g' parameter

2 years agotclpkg tclGdSizeCmd: squash an -Wunused-parameter warning
Matthew Fernandez [Fri, 22 Jul 2022 01:05:09 +0000 (18:05 -0700)]
tclpkg tclGdSizeCmd: squash an -Wunused-parameter warning

This parameter cannot easily be removed because this function is used as a
callback and needs to conform to a particular type signature.

2 years agoMerge branch 'smattr/d5eaf8b2-870d-4ef0-9557-51428f498a1b' into 'main'
Matthew Fernandez [Tue, 26 Jul 2022 03:00:38 +0000 (03:00 +0000)]
Merge branch 'smattr/d5eaf8b2-870d-4ef0-9557-51428f498a1b' into 'main'

misc simplification

See merge request graphviz/graphviz!2768

2 years agoPango plugin: remove unnecessary cast
Matthew Fernandez [Tue, 19 Jul 2022 03:00:30 +0000 (20:00 -0700)]
Pango plugin: remove unnecessary cast

2 years agoGDK plugin: remove unnecessary casts
Matthew Fernandez [Tue, 19 Jul 2022 03:00:16 +0000 (20:00 -0700)]
GDK plugin: remove unnecessary casts

2 years agoGD plugin: remove unnecessary casts
Matthew Fernandez [Tue, 19 Jul 2022 02:59:46 +0000 (19:59 -0700)]
GD plugin: remove unnecessary casts

2 years agorsvg plugin gvloadimage_rsvg_cairo: remove unnecessary cast
Matthew Fernandez [Tue, 19 Jul 2022 02:49:22 +0000 (19:49 -0700)]
rsvg plugin gvloadimage_rsvg_cairo: remove unnecessary cast

2 years agoglcomp plugin file_exists: simplify readability test
Matthew Fernandez [Tue, 19 Jul 2022 02:46:29 +0000 (19:46 -0700)]
glcomp plugin file_exists: simplify readability test

We do not need to open a file to test if it is readable.

2 years agoexpr extoken_fn: simplify hex parsing loop
Matthew Fernandez [Tue, 19 Jul 2022 02:42:42 +0000 (19:42 -0700)]
expr extoken_fn: simplify hex parsing loop

2 years agoexpr prformat: replace pointer and extent with central string view abstraction
Matthew Fernandez [Tue, 19 Jul 2022 02:30:50 +0000 (19:30 -0700)]
expr prformat: replace pointer and extent with central string view abstraction

2 years agocommon: remove some unnecessary casts
Matthew Fernandez [Tue, 19 Jul 2022 02:25:57 +0000 (19:25 -0700)]
common: remove some unnecessary casts

2 years agoMerge branch 'fix-subgraph-layout-and-rendering' into 'main'
Magnus Jacobsson [Mon, 25 Jul 2022 19:26:06 +0000 (19:26 +0000)]
Merge branch 'fix-subgraph-layout-and-rendering' into 'main'

Fix subgraph layout and rendering

Closes #1800

See merge request graphviz/graphviz!2767

2 years agoremove GD_drawing(g) NULL guard
Magnus Jacobsson [Tue, 12 Jul 2022 13:15:50 +0000 (15:15 +0200)]
remove GD_drawing(g) NULL guard

This guard is unnecessary since `graph_cleanup` alrady has the
necessary guards. This also ensures that the Agraphinfo_t record and
the graph's label is cleaned away even if the graph for some reason
doesn't have a drawing (can this ever happen?).

2 years agogvFreeLayout: correct comments about reset and root graph
Magnus Jacobsson [Tue, 12 Jul 2022 13:04:57 +0000 (15:04 +0200)]
gvFreeLayout: correct comments about reset and root graph

This comment was added in 44b02b91bd156cb832894fb4948bf4bc75ab27cb,
but this commit changed the cleanup to work on the given graph
(possibly a subgraph), not the root graph. The resets mentioned were
removed in 67acd9e27a053a5b80b3d1458f512d472debb434,
b3b7e0d1aea43baa81bf06a27d38447d6958c1b8 and
a71555a4ac650bf91396c77c277697b45eee44e6, although the called
`graph_cleanup` function does its own reset.

2 years agogvFreeLayout: remove incorrect comment about only the root graph having a drawing
Magnus Jacobsson [Wed, 6 Jul 2022 12:56:16 +0000 (14:56 +0200)]
gvFreeLayout: remove incorrect comment about only the root graph having a drawing

This comment was added in c55b546e3965a8dfd2a66763961c4a8003e433bf,
but both subgraphs and root graphs have a reference to (the same)
drawing through this statement in gvLayoutJobs:

    GD_drawing(agroot(g)) = GD_drawing(g);

2 years agotwopigen: layout: fix heap-buffer-overflow by storing dimension in root graph
Magnus Jacobsson [Mon, 18 Jul 2022 13:02:59 +0000 (15:02 +0200)]
twopigen: layout: fix heap-buffer-overflow by storing dimension in root graph

The layout allocates memory based on the dimension of the root graph,
but since the dimension was stored in the subgraph and the dimension
in the root graph defaulted to zero, too little memory was allocated.

An alternative solution would have been to use the dimension of the
subgraph, but this had other implications and the chosen solution is
the same as what the other two layout engines supporting the dim
attribute (neato and sfdp) use. Twopi always uses two dimensions.

This fixes the last memory issue detected by ASan in the
test_subgraph_layout test, which now runs without failures.

2 years agocircogen: layout: fix heap-buffer-overflow by storing dimension in root graph
Magnus Jacobsson [Mon, 18 Jul 2022 12:56:45 +0000 (14:56 +0200)]
circogen: layout: fix heap-buffer-overflow by storing dimension in root graph

The layout allocates memory based on the dimension of the root graph,
but since the dimension was stored in the subgraph and the dimension
in the root graph defaulted to zero, too little memory was allocated.

An alternative solution would have been to use the dimension of the
subgraph, but this had other implications and the chosen solution is
the same as what the other two layout engines supporting the `dim`
attribute (neato and sfdp) use. Circo always uses two dimensions.

2 years agofdpgen: layout: fix heap-buffer-overflow by storing dimension in root graph
Magnus Jacobsson [Mon, 18 Jul 2022 12:17:04 +0000 (14:17 +0200)]
fdpgen: layout: fix heap-buffer-overflow by storing dimension in root graph

The layout allocates memory based on the dimension of the root graph,
but since the dimension was stored in the subgraph and the dimension
in the root graph defaulted to zero, too little memory was allocated.

An alternative solution would have been to use the dimension of the
subgraph, but this had other implications and the chosen solution is
the same as what the other two layout engines supporting the `dim`
attribute (neato and sfdp) use.

2 years agogvRender*: render subgraph when given, not always root graph
Magnus Jacobsson [Mon, 18 Jul 2022 15:46:01 +0000 (17:46 +0200)]
gvRender*: render subgraph when given, not always root graph

These functions always rendered the root graph, even if a sub graph
was given. Apart from being incorrect, this caused
heap-buffer-overflow when trying to render a graph consisting of two
subgraph of which only one had a layout. Also, even if both subgraphs
had layouts, they somehow mixed up the bounding boxes of the graphs
causing some nodes and edges not to be rendered since they were
outside the graph bounding box.

2 years agogvLayoutJobs: initialize also root graph if it isn't already
Magnus Jacobsson [Wed, 13 Jul 2022 06:17:54 +0000 (08:17 +0200)]
gvLayoutJobs: initialize also root graph if it isn't already

The root graph info is needed by gvLayoutJobs when doing subgraph
layout. This fixes a heap-buffer-overflow detected by ASan in the
test_subgraph_layout test.

2 years agoadd new test test_subgraph_layout
Magnus Jacobsson [Tue, 12 Jul 2022 13:52:26 +0000 (15:52 +0200)]
add new test test_subgraph_layout

This test is run in CI with ASan leak detection enabled. It currectly
fails because ASan detects several memory issues in various layout
engines.

2 years agopatchwork: fix memory leak by freeing cluster data in graph cleanup
Magnus Jacobsson [Mon, 18 Jul 2022 07:53:21 +0000 (09:53 +0200)]
patchwork: fix memory leak by freeing cluster data in graph cleanup

This fixes a memory leak detected by ASan in the test_clusters test,
which now runs without failures

2 years agodotgen cluster: fix memory leaks by freeing data from removed rank leaders
Magnus Jacobsson [Mon, 18 Jul 2022 07:47:15 +0000 (09:47 +0200)]
dotgen cluster: fix memory leaks by freeing data from removed rank leaders

The `build_skeleton` function inserts virtual nodes and edges into the
graph to be used by the clustering algorithms. The `expand_cluster`
function later installs real nodes or sub-clusters and deletes the
virtual nodes and edges by calling the `remove_rank_leaders` function
which removes these from the graph. However, it didn't free the data
allocated for them which caused several memory leaks.

2 years agoadd new test case test_clusters
Magnus Jacobsson [Sun, 10 Jul 2022 08:47:22 +0000 (10:47 +0200)]
add new test case test_clusters

Upcoming commits in this series will make changes to subgraph layout
and since clusters are also subgraphs, we want to weed out any memory
issues related to clusters separately.

This test is run in CI with ASan leak detection enabled. It currectly
fails because ASan detects memory leaks in the dot and patchwork
layout engines.

2 years agodon't clean away Agraphinfo_t in layout specific cleanups
Magnus Jacobsson [Tue, 12 Jul 2022 13:11:25 +0000 (15:11 +0200)]
don't clean away Agraphinfo_t in layout specific cleanups

This cleanup is since 2b3b37c47244f57a9690bff8fb92f77d17ec616c handled
by the general `graph_cleanup` function.

This information is since 44b02b91bd156cb832894fb4948bf4bc75ab27cb
needed by the general layout cleanup function that runs after the
layout-specific cleanup.

This problem was fixed for root graphs in commit
c55b546e3965a8dfd2a66763961c4a8003e433bf, but not for subgraph layout.

This fixes a heap-buffer-overflow detected by ASan in the
test_neatopack test, which now runs without failures.

This commit also reverts commit
291b7a40f742551797e5681acbb8f5662c084822 since the
dot.demo/neatopack.c example now runs without failures.

Fixes https://gitlab.com/graphviz/graphviz/-/issues/1800.

2 years agoadd new test_neatopack test
Magnus Jacobsson [Mon, 4 Jul 2022 13:01:10 +0000 (15:01 +0200)]
add new test_neatopack test

Upcoming commits in this series will make changes to gvFreeLayout and
we want to ensure that those changes don't introduce any memory leaks
when run with ASan, since gvFreeLayout handles cleanup of both
subgraphs and the root graph and the test case extracts subgraphs from
the root graph.

This test is run in CI with ASan leak detection enabled. It is more or
less a replica of 'dot.demo/neatopack.c', which is also tested in CI
by 'tests/test_examples.py', but with leak detection disabled. It
currently fails because of a heap-buffer-overflow in the gvFreeLayout.

Towards https://gitlab.com/graphviz/graphviz/-/issues/1800.

2 years agodot.demo/neatopack.c: add missing free of connected components subgraphs
Magnus Jacobsson [Wed, 6 Jul 2022 07:46:19 +0000 (09:46 +0200)]
dot.demo/neatopack.c: add missing free of connected components subgraphs

Towards https://gitlab.com/graphviz/graphviz/-/issues/1800.

2 years agodot.demo/neatopack.c: add missing initialization
Magnus Jacobsson [Mon, 4 Jul 2022 09:43:14 +0000 (11:43 +0200)]
dot.demo/neatopack.c: add missing initialization

Normally gvLayoutJobs does this initialization, but since we call
ccomps before doing the layout and it expects graphs and nodes to have
'Agraphinfo_t' and 'Anodeinfo_t' records attached already, we must do
this initialization in the user program instead, see
https://graphviz.org/pdf/pack.3.pdf.

Fixes first part of
https://gitlab.com/graphviz/graphviz/-/issues/1800.

2 years agoadd new test_subgraphs test
Magnus Jacobsson [Tue, 5 Jul 2022 20:45:20 +0000 (22:45 +0200)]
add new test_subgraphs test

Upcoming commits in this series will make changes to gvFreeLayout and
we want to ensure that those changes don't introduce any memory leaks
when run with ASan, since gvFreeLayout handles cleanup of both
subgraphs and the root graph.

This test is run in CI with ASan leak detection enabled.

Towards https://gitlab.com/graphviz/graphviz/-/issues/1800.

2 years agoosage_cleanup: add missing cleanup of edges
Magnus Jacobsson [Sun, 17 Jul 2022 11:13:14 +0000 (13:13 +0200)]
osage_cleanup: add missing cleanup of edges

This fixes a memory leak detected by ASan in the test_engines test,
which now runs without failures

2 years agoadd new simple test_engines test
Magnus Jacobsson [Tue, 5 Jul 2022 17:22:31 +0000 (19:22 +0200)]
add new simple test_engines test

Upcoming commits in this series will make changes to gvFreeLayout and
we want to ensure that those changes don't introduce any memory leaks
when run with ASan, since gvFreeLayout calls layout-specific cleanup
functions.

This test is run in CI with ASan leak detection enabled. It currently
fails because of a memory leak in the osage layout.

Towards https://gitlab.com/graphviz/graphviz/-/issues/1800.

2 years agoadd the fmt library as a test dependency
Magnus Jacobsson [Tue, 19 Jul 2022 19:13:12 +0000 (21:13 +0200)]
add the fmt library as a test dependency

2 years agoadd libfmt-dev to Ubuntu 22.04 Dockerfile
Magnus Jacobsson [Sun, 6 Mar 2022 13:11:31 +0000 (14:11 +0100)]
add libfmt-dev to Ubuntu 22.04 Dockerfile

It is going to be used in new tests in upcoming commits.

2 years agotests: CMake: change test_common from a static to a shared library
Magnus Jacobsson [Fri, 22 Jul 2022 12:10:19 +0000 (14:10 +0200)]
tests: CMake: change test_common from a static to a shared library

This was the original intention according to the commit message in
commit a9daedd8bee1b5620a933b612c3335b90bde263d.

2 years agotests/CMakeLists.txt: sort test cases
Magnus Jacobsson [Wed, 6 Jul 2022 10:42:02 +0000 (12:42 +0200)]
tests/CMakeLists.txt: sort test cases

2 years agoMerge branch 'smattr/BA128E20-1C11-4C5C-978E-6F16C28B3671' into 'main'
Matthew Fernandez [Sun, 24 Jul 2022 05:52:16 +0000 (05:52 +0000)]
Merge branch 'smattr/BA128E20-1C11-4C5C-978E-6F16C28B3671' into 'main'

rephrase comparators to avoid arithmetic

See merge request graphviz/graphviz!2766

2 years agosparse comp_ascend_int: remove unnecessary parens
Matthew Fernandez [Fri, 8 Jul 2022 00:24:05 +0000 (17:24 -0700)]
sparse comp_ascend_int: remove unnecessary parens

2 years agosfdpgen scomp: remove unnecessary parens
Matthew Fernandez [Fri, 8 Jul 2022 00:24:05 +0000 (17:24 -0700)]
sfdpgen scomp: remove unnecessary parens

2 years agopatchwork nodecmp: rephrase comparator to avoid arithmetic
Matthew Fernandez [Fri, 8 Jul 2022 00:24:05 +0000 (17:24 -0700)]
patchwork nodecmp: rephrase comparator to avoid arithmetic

cccb8b1d22a18031fc92d93133c7fa14ef7e1361 fixed an integer overflow in a
`memcmp`-/`strcmp`-like comparator. The same situation exists in the code
touched in this commit. Rather than wait for an edge case to expose an overflow
here, this change makes the same update, removing arithmetic and the consequent
possibility of overflow.

2 years agopack cmpf: rephrase comparator to avoid arithmetic
Matthew Fernandez [Fri, 8 Jul 2022 00:24:05 +0000 (17:24 -0700)]
pack cmpf: rephrase comparator to avoid arithmetic

cccb8b1d22a18031fc92d93133c7fa14ef7e1361 fixed an integer overflow in a
`memcmp`-/`strcmp`-like comparator. The same situation exists in the code
touched in this commit. Rather than wait for an edge case to expose an overflow
here, this change makes the same update, removing arithmetic and the consequent
possibility of overflow.

2 years agoneatogen cmpIpair: rephrase comparator to avoid arithmetic
Matthew Fernandez [Fri, 8 Jul 2022 00:24:05 +0000 (17:24 -0700)]
neatogen cmpIpair: rephrase comparator to avoid arithmetic

cccb8b1d22a18031fc92d93133c7fa14ef7e1361 fixed an integer overflow in a
`memcmp`-/`strcmp`-like comparator. The same situation exists in the code
touched in this commit. Rather than wait for an edge case to expose an overflow
here, this change makes the same update, removing arithmetic and the consequent
possibility of overflow.

2 years agoneatogen cmpitem: rephrase comparator to avoid arithmetic
Matthew Fernandez [Fri, 8 Jul 2022 00:24:05 +0000 (17:24 -0700)]
neatogen cmpitem: rephrase comparator to avoid arithmetic

cccb8b1d22a18031fc92d93133c7fa14ef7e1361 fixed an integer overflow in a
`memcmp`-/`strcmp`-like comparator. The same situation exists in the code
touched in this commit. Rather than wait for an edge case to expose an overflow
here, this change makes the same update, removing arithmetic and the consequent
possibility of overflow.

2 years agofdpgen ijcmpf: rephrase comparator to avoid arithmetic
Matthew Fernandez [Fri, 8 Jul 2022 00:24:05 +0000 (17:24 -0700)]
fdpgen ijcmpf: rephrase comparator to avoid arithmetic

cccb8b1d22a18031fc92d93133c7fa14ef7e1361 fixed an integer overflow in a
`memcmp`-/`strcmp`-like comparator. The same situation exists in the code
touched in this commit. Rather than wait for an edge case to expose an overflow
here, this change makes the same update, removing arithmetic and the consequent
possibility of overflow.

2 years agodotgen edgeposcmpf: rephrase comparator to avoid arithmetic
Matthew Fernandez [Fri, 8 Jul 2022 00:24:05 +0000 (17:24 -0700)]
dotgen edgeposcmpf: rephrase comparator to avoid arithmetic

cccb8b1d22a18031fc92d93133c7fa14ef7e1361 fixed an integer overflow in a
`memcmp`-/`strcmp`-like comparator. The same situation exists in the code
touched in this commit. Rather than wait for an edge case to expose an overflow
here, this change makes the same update, removing arithmetic and the consequent
possibility of overflow.

2 years agodotgen nodeposcmpf: rephrase comparator to avoid arithmetic
Matthew Fernandez [Fri, 8 Jul 2022 00:24:05 +0000 (17:24 -0700)]
dotgen nodeposcmpf: rephrase comparator to avoid arithmetic

cccb8b1d22a18031fc92d93133c7fa14ef7e1361 fixed an integer overflow in a
`memcmp`-/`strcmp`-like comparator. The same situation exists in the code
touched in this commit. Rather than wait for an edge case to expose an overflow
here, this change makes the same update, removing arithmetic and the consequent
possibility of overflow.

2 years agodotgen ordercmpf: rephrase comparator to avoid arithmetic
Matthew Fernandez [Fri, 8 Jul 2022 00:24:05 +0000 (17:24 -0700)]
dotgen ordercmpf: rephrase comparator to avoid arithmetic

cccb8b1d22a18031fc92d93133c7fa14ef7e1361 fixed an integer overflow in a
`memcmp`-/`strcmp`-like comparator. The same situation exists in the code
touched in this commit. Rather than wait for an edge case to expose an overflow
here, this change makes the same update, removing arithmetic and the consequent
possibility of overflow.

2 years agocommon textfont_comparf: rephrase comparator to avoid arithmetic
Matthew Fernandez [Fri, 8 Jul 2022 00:24:05 +0000 (17:24 -0700)]
common textfont_comparf: rephrase comparator to avoid arithmetic

cccb8b1d22a18031fc92d93133c7fa14ef7e1361 fixed an integer overflow in a
`memcmp`-/`strcmp`-like comparator. The same situation exists in the code
touched in this commit. Rather than wait for an edge case to expose an overflow
here, this change makes the same update, removing arithmetic and the consequent
possibility of overflow.

2 years agocommon increasingrankcmpf: rephrase comparator to avoid arithmetic
Matthew Fernandez [Fri, 8 Jul 2022 00:24:05 +0000 (17:24 -0700)]
common increasingrankcmpf: rephrase comparator to avoid arithmetic

cccb8b1d22a18031fc92d93133c7fa14ef7e1361 fixed an integer overflow in a
`memcmp`-/`strcmp`-like comparator. The same situation exists in the code
touched in this commit. Rather than wait for an edge case to expose an overflow
here, this change makes the same update, removing arithmetic and the consequent
possibility of overflow.

2 years agocommon decreasingrankcmpf: rephrase comparator to avoid arithmetic
Matthew Fernandez [Fri, 8 Jul 2022 00:24:05 +0000 (17:24 -0700)]
common decreasingrankcmpf: rephrase comparator to avoid arithmetic

cccb8b1d22a18031fc92d93133c7fa14ef7e1361 fixed an integer overflow in a
`memcmp`-/`strcmp`-like comparator. The same situation exists in the code
touched in this commit. Rather than wait for an edge case to expose an overflow
here, this change makes the same update, removing arithmetic and the consequent
possibility of overflow.

2 years agocgraph agsubnodeseqcmpf: remove unnecessary casts
Matthew Fernandez [Fri, 8 Jul 2022 00:24:05 +0000 (17:24 -0700)]
cgraph agsubnodeseqcmpf: remove unnecessary casts

2 years agocgraph agsubnodeidcmpf: remove unnecessary casts
Matthew Fernandez [Fri, 8 Jul 2022 00:24:05 +0000 (17:24 -0700)]
cgraph agsubnodeidcmpf: remove unnecessary casts

2 years agogvcolor cmpf: rephrase comparator to avoid arithmetic
Matthew Fernandez [Fri, 8 Jul 2022 00:24:05 +0000 (17:24 -0700)]
gvcolor cmpf: rephrase comparator to avoid arithmetic

cccb8b1d22a18031fc92d93133c7fa14ef7e1361 fixed an integer overflow in a
`memcmp`-/`strcmp`-like comparator. The same situation exists in the code
touched in this commit. Rather than wait for an edge case to expose an overflow
here, this change makes the same update, removing arithmetic and the consequent
possibility of overflow.

2 years agodijkstra cmpf: rephrase comparator to avoid arithmetic
Matthew Fernandez [Fri, 8 Jul 2022 00:24:05 +0000 (17:24 -0700)]
dijkstra cmpf: rephrase comparator to avoid arithmetic

cccb8b1d22a18031fc92d93133c7fa14ef7e1361 fixed an integer overflow in a
`memcmp`-/`strcmp`-like comparator. The same situation exists in the code
touched in this commit. Rather than wait for an edge case to expose an overflow
here, this change makes the same update, removing arithmetic and the consequent
possibility of overflow.

2 years agodotgen edgelblcmpfn: remove unnecessary casts
Matthew Fernandez [Fri, 8 Jul 2022 00:24:05 +0000 (17:24 -0700)]
dotgen edgelblcmpfn: remove unnecessary casts

2 years agodotgen edgecmp: rephrase comparator to avoid arithmetic
Matthew Fernandez [Fri, 8 Jul 2022 00:24:05 +0000 (17:24 -0700)]
dotgen edgecmp: rephrase comparator to avoid arithmetic

cccb8b1d22a18031fc92d93133c7fa14ef7e1361 fixed an integer overflow in a
`memcmp`-/`strcmp`-like comparator. The same situation exists in the code
touched in this commit. Rather than wait for an edge case to expose an overflow
here, this change makes the same update, removing arithmetic and the consequent
possibility of overflow.

Note that the first comparison in this function appears to be the wrong way
around. But this (mistake?) is left as-is.

2 years agodotgen edgecmp: remove unnecessary casts
Matthew Fernandez [Fri, 8 Jul 2022 00:24:05 +0000 (17:24 -0700)]
dotgen edgecmp: remove unnecessary casts

2 years agocircogen: remove commented out 'cleanBlocklist'
Matthew Fernandez [Fri, 8 Jul 2022 00:24:05 +0000 (17:24 -0700)]
circogen: remove commented out 'cleanBlocklist'

This was commented out when first committed in the initial revision,
256ef66663ca0c072554ee3f5e7971911031b3c7. It has never been uncommented or used.

2 years agoMerge branch 'smattr/ac7d6a52-2008-42b9-8ce4-e82b996d2211' into 'main'
Matthew Fernandez [Sat, 23 Jul 2022 01:14:16 +0000 (01:14 +0000)]
Merge branch 'smattr/ac7d6a52-2008-42b9-8ce4-e82b996d2211' into 'main'

squash more -Wunused-parameter warnings

See merge request graphviz/graphviz!2765

2 years agoneatogen getPath: remove unused obstacle parameters
Matthew Fernandez [Sun, 17 Jul 2022 22:51:06 +0000 (15:51 -0700)]
neatogen getPath: remove unused obstacle parameters

This function ignores obstacles when routing.

2 years agodotgen make_flat_adj_edges: remove unused 'P' parameter
Matthew Fernandez [Sun, 17 Jul 2022 22:44:42 +0000 (15:44 -0700)]
dotgen make_flat_adj_edges: remove unused 'P' parameter

2 years agodotgen cloneNode: remove unused 'flipped' parameter
Matthew Fernandez [Sun, 17 Jul 2022 22:43:31 +0000 (15:43 -0700)]
dotgen cloneNode: remove unused 'flipped' parameter

2 years agodotgen constraining_flat_edge: remove unused 'v' parameter
Matthew Fernandez [Sun, 17 Jul 2022 22:32:33 +0000 (15:32 -0700)]
dotgen constraining_flat_edge: remove unused 'v' parameter

2 years agodotgen getCluster: remove unused 'g' parameter
Matthew Fernandez [Sun, 17 Jul 2022 22:31:08 +0000 (15:31 -0700)]
dotgen getCluster: remove unused 'g' parameter

This also makes `g` in `makeCompoundEdge` unused, so we remove that parameter
too.

2 years agodotgen make_interclust_chain: remove unused 'g' parameter
Matthew Fernandez [Sun, 17 Jul 2022 22:27:14 +0000 (15:27 -0700)]
dotgen make_interclust_chain: remove unused 'g' parameter

2 years agotopfish make_coarse_ex_graph: remove unused 'nvtxs' parameter
Matthew Fernandez [Sun, 17 Jul 2022 22:25:34 +0000 (15:25 -0700)]
topfish make_coarse_ex_graph: remove unused 'nvtxs' parameter

2 years agotopfish make_coarse_graph: remove unused 'nvtxs' parameter
Matthew Fernandez [Sun, 17 Jul 2022 22:24:05 +0000 (15:24 -0700)]
topfish make_coarse_graph: remove unused 'nvtxs' parameter

2 years agogvc: remove unused 'gvevent_delete'
Matthew Fernandez [Sun, 17 Jul 2022 22:18:32 +0000 (15:18 -0700)]
gvc: remove unused 'gvevent_delete'

The `del` field was added to `gvdevice_callbacks_t` in
ad82f9fa3212cbaa01625f3c27a1e90c1c990fd2 under the name `delete`, but seemingly
has never been used by any in-tree plugin. This commit removes a no-op,
never-called callback for it, squashing some -Wunused-parameter warnings.

This commit does not remove the member because it is part of the public API. We
are assuming the convention is to check these pointers against null before
calling them, like the other GVC structs. But the struct has no comment
explaining it nor how it is meant to be used, so we cannot be sure how/if users
would be relying on this.