]> granicus.if.org Git - graphviz/log
graphviz
3 years agosmyrna: fix comment typos
Matthew Fernandez [Wed, 10 Nov 2021 15:18:47 +0000 (07:18 -0800)]
smyrna: fix comment typos

3 years agosmyrna: remove C++ 'extern "C"' guards
Matthew Fernandez [Wed, 10 Nov 2021 15:18:02 +0000 (07:18 -0800)]
smyrna: remove C++ 'extern "C"' guards

Smyrna is written entirely in C, so these guards are unused.

3 years agoMerge branch 'smattr/c9c2aa68-dc61-4ae6-877e-e332899e1938' into 'main'
Matthew Fernandez [Mon, 15 Nov 2021 16:53:59 +0000 (16:53 +0000)]
Merge branch 'smattr/c9c2aa68-dc61-4ae6-877e-e332899e1938' into 'main'

plugin/core related warning squashing

See merge request graphviz/graphviz!2282

3 years agomp_end_edge: squash -Wunused-parameter warning
Matthew Fernandez [Sat, 13 Nov 2021 01:51:50 +0000 (17:51 -0800)]
mp_end_edge: squash -Wunused-parameter warning

3 years agomp_begin_edge: squash -Wunused-parameter warning
Matthew Fernandez [Sat, 13 Nov 2021 01:51:37 +0000 (17:51 -0800)]
mp_begin_edge: squash -Wunused-parameter warning

3 years agomp_end_node: squash -Wunused-parameter warning
Matthew Fernandez [Sat, 13 Nov 2021 01:51:22 +0000 (17:51 -0800)]
mp_end_node: squash -Wunused-parameter warning

3 years agomp_begin_node: squash -Wunused-parameter warning
Matthew Fernandez [Sat, 13 Nov 2021 01:51:06 +0000 (17:51 -0800)]
mp_begin_node: squash -Wunused-parameter warning

3 years agomp_begin_page: squash -Wunused-parameter warning
Matthew Fernandez [Sat, 13 Nov 2021 01:50:51 +0000 (17:50 -0800)]
mp_begin_page: squash -Wunused-parameter warning

3 years agofig_end_edge: squash -Wunused-parameter warning
Matthew Fernandez [Sat, 13 Nov 2021 01:46:16 +0000 (17:46 -0800)]
fig_end_edge: squash -Wunused-parameter warning

3 years agofig_begin_edge: squash -Wunused-parameter warning
Matthew Fernandez [Sat, 13 Nov 2021 01:46:05 +0000 (17:46 -0800)]
fig_begin_edge: squash -Wunused-parameter warning

3 years agofig_end_node: squash -Wunused-parameter warning
Matthew Fernandez [Sat, 13 Nov 2021 01:45:49 +0000 (17:45 -0800)]
fig_end_node: squash -Wunused-parameter warning

3 years agofig_begin_node: squash -Wunused-parameter warning
Matthew Fernandez [Sat, 13 Nov 2021 01:45:33 +0000 (17:45 -0800)]
fig_begin_node: squash -Wunused-parameter warning

3 years agofig_begin_page: squash -Wunused-parameter warning
Matthew Fernandez [Sat, 13 Nov 2021 01:45:18 +0000 (17:45 -0800)]
fig_begin_page: squash -Wunused-parameter warning

3 years agocore_loadimage_xdot: squash -Wunused-parameter warning
Matthew Fernandez [Sat, 13 Nov 2021 01:43:52 +0000 (17:43 -0800)]
core_loadimage_xdot: squash -Wunused-parameter warning

3 years agoxdot_gradient_fillcolor: use double instead of float for 'r1', 'r2'
Matthew Fernandez [Sat, 13 Nov 2021 01:35:31 +0000 (17:35 -0800)]
xdot_gradient_fillcolor: use double instead of float for 'r1', 'r2'

Squashes a number of -Wfloat-conversion warnings.

3 years agoxdot_gradient_fillcolor: remove dead store to 'r1'
Matthew Fernandez [Sat, 13 Nov 2021 01:32:47 +0000 (17:32 -0800)]
xdot_gradient_fillcolor: remove dead store to 'r1'

This variable is overwritten on line 648 without having been read in between.
This code appears copy-pasted from `cairo_gradient_fill` without noticing that
this line is unused here.

3 years agoget_gradient_points: take 'angle' as a double instead of a float
Matthew Fernandez [Sat, 13 Nov 2021 01:29:12 +0000 (17:29 -0800)]
get_gradient_points: take 'angle' as a double instead of a float

The originating values used to compute an angle were generally doubles and
computation was done in `get_gradient_points` as if this value was a double
(e.g. calling `sin` and `cos`). Treating it consistently as a double squashes a
number of -Wfloat-conversion compiler warnings and improves precision.

3 years agodot_end_graph: squash -Wswitch-default warning
Matthew Fernandez [Sat, 13 Nov 2021 01:21:33 +0000 (17:21 -0800)]
dot_end_graph: squash -Wswitch-default warning

3 years agodot_begin_graph: squash -Wswitch-default warning
Matthew Fernandez [Sat, 13 Nov 2021 01:20:19 +0000 (17:20 -0800)]
dot_begin_graph: squash -Wswitch-default warning

3 years agowrite_plain: take a C99 bool for 'extend' parameter
Matthew Fernandez [Sat, 13 Nov 2021 01:18:06 +0000 (17:18 -0800)]
write_plain: take a C99 bool for 'extend' parameter

3 years agoMerge branch 'smattr/72003c76-27a7-431f-95d7-c69e57514be2' into 'main'
Matthew Fernandez [Sun, 14 Nov 2021 22:58:18 +0000 (22:58 +0000)]
Merge branch 'smattr/72003c76-27a7-431f-95d7-c69e57514be2' into 'main'

lib/common: more warning squashing

See merge request graphviz/graphviz!2273

3 years agofreeMPair: squash -Wunused-parameter warning
Matthew Fernandez [Tue, 9 Nov 2021 02:53:31 +0000 (18:53 -0800)]
freeMPair: squash -Wunused-parameter warning

3 years agomkMPair: squash -Wunused-parameter warning
Matthew Fernandez [Tue, 9 Nov 2021 02:53:15 +0000 (18:53 -0800)]
mkMPair: squash -Wunused-parameter warning

3 years agocmppair: squash -Wunused-parameter warnings
Matthew Fernandez [Tue, 9 Nov 2021 02:51:18 +0000 (18:51 -0800)]
cmppair: squash -Wunused-parameter warnings

3 years agofreePair: squash -Wunused-parameter warnings
Matthew Fernandez [Tue, 9 Nov 2021 02:51:05 +0000 (18:51 -0800)]
freePair: squash -Wunused-parameter warnings

3 years agoestimate_character_width_canonical: squash a -Wsign-conversion warning
Matthew Fernandez [Tue, 9 Nov 2021 02:46:54 +0000 (18:46 -0800)]
estimate_character_width_canonical: squash a -Wsign-conversion warning

3 years agofont_in_list_permissive: squash -Wsign-conversion warning
Matthew Fernandez [Tue, 9 Nov 2021 02:45:41 +0000 (18:45 -0800)]
font_in_list_permissive: squash -Wsign-conversion warning

The preceding logic guarantees this value will be non-negative.

3 years agoall_font_metrics_len: squash -Wold-style-declaration warning
Matthew Fernandez [Tue, 9 Nov 2021 02:44:09 +0000 (18:44 -0800)]
all_font_metrics_len: squash -Wold-style-declaration warning

3 years agotextfont_comparf: squash -Wunused-parameter warnings
Matthew Fernandez [Tue, 9 Nov 2021 02:43:07 +0000 (18:43 -0800)]
textfont_comparf: squash -Wunused-parameter warnings

3 years agotextfont_freef: squash -Wunused-parameter warnings
Matthew Fernandez [Tue, 9 Nov 2021 02:42:54 +0000 (18:42 -0800)]
textfont_freef: squash -Wunused-parameter warnings

3 years agotextfont_makef: squash -Wunused-parameter warnings
Matthew Fernandez [Tue, 9 Nov 2021 02:42:39 +0000 (18:42 -0800)]
textfont_makef: squash -Wunused-parameter warnings

3 years agohsv2rgb: squash a -Wswitch-default warning
Matthew Fernandez [Tue, 9 Nov 2021 02:39:09 +0000 (18:39 -0800)]
hsv2rgb: squash a -Wswitch-default warning

The preceding logic makes the rest of the switch exhaustive.

3 years agogvrender_beziercurve: realign 'filled' parameter type
Matthew Fernandez [Tue, 9 Nov 2021 02:33:49 +0000 (18:33 -0800)]
gvrender_beziercurve: realign 'filled' parameter type

This appears to have been a mistake, in that all the other `gvrender_*`
functions take an `int` for the `filled` parameter. This does not appear to have
caused any visible effects, as the values passed to this function always fit in
a `boolean`. But the compiler complained that it thought unintended value
truncation was occurring.

Squashes 3 -Wconversion compiler warnings.

3 years agoMerge branch 'smattr/4AE39E22-FD66-458A-81E4-F54395DA6F4D' into 'main'
Matthew Fernandez [Sun, 14 Nov 2021 21:08:00 +0000 (21:08 +0000)]
Merge branch 'smattr/4AE39E22-FD66-458A-81E4-F54395DA6F4D' into 'main'

remove 'real' and 'REAL' abstractions

See merge request graphviz/graphviz!2274

3 years agogvmap: remove unused 'REAL' definitions
Matthew Fernandez [Wed, 10 Nov 2021 02:31:44 +0000 (18:31 -0800)]
gvmap: remove unused 'REAL' definitions

3 years agoremove 'real' abstraction
Matthew Fernandez [Wed, 10 Nov 2021 02:28:51 +0000 (18:28 -0800)]
remove 'real' abstraction

This was not configurable and always mapped to the type `double`. There were
also implicit assumptions that `real` and `double` were interchangeable. This
alias is removed to avoid future confusion.

The diff appears large, but it is just removing two #defines of `real` and
propagating their definition (`double`) to all usage sites.

3 years agoMerge branch 'smattr/D885CA52-BAA6-4360-A822-28B64F491590' into 'main'
Matthew Fernandez [Sun, 14 Nov 2021 20:01:00 +0000 (20:01 +0000)]
Merge branch 'smattr/D885CA52-BAA6-4360-A822-28B64F491590' into 'main'

fix assertion typo that overwrote matrix value type and stop disabling assertions

See merge request graphviz/graphviz!2275

3 years agogeneral.h: stop disabling assertions when 'DEBUG' is undefined
Matthew Fernandez [Wed, 10 Nov 2021 01:49:41 +0000 (17:49 -0800)]
general.h: stop disabling assertions when 'DEBUG' is undefined

The effect of this code was that #including general.h prior to assert.h would
disable assertions in your code. Not #including general.h or #including it after
assert.h would allow assertions to be controlled through the standard `NDEBUG`
mechanism. It is not clear why suppressing assertions like this was ever
desirable.

This is basically another variant of commit
68bcbbd4ddef4960c7ea6884dda10854b0e012e0.

3 years agojacobi: fix assertion typo that overwrote matrix value type
Matthew Fernandez [Wed, 10 Nov 2021 02:37:55 +0000 (18:37 -0800)]
jacobi: fix assertion typo that overwrote matrix value type

Comparing to the surrounding functions in this file, this was clearly meant to
be checking the type of the matrix not setting it. This was benign as, due to a
separate problem, assertions are disabled in this file, making this a no-op. The
next commit will re-enable assertions, which caused this issue to be discovered
through a compiler error.

3 years agoMerge branch 'smattr/55E4573C-CAE0-483D-8653-15C54F4EFE6A' into 'main'
Matthew Fernandez [Sun, 14 Nov 2021 18:55:13 +0000 (18:55 +0000)]
Merge branch 'smattr/55E4573C-CAE0-483D-8653-15C54F4EFE6A' into 'main'

fix: use 'find_program' instead of 'find_package' to locate Git in CMake build

Closes #2145

See merge request graphviz/graphviz!2272

3 years agofix: use 'find_program' instead of 'find_package' to locate Git in CMake build
Matthew Fernandez [Mon, 8 Nov 2021 00:13:38 +0000 (16:13 -0800)]
fix: use 'find_program' instead of 'find_package' to locate Git in CMake build

The Cygwin CMake CI task recently started stalling after the “Found FLEX” step.
Reordering CMake steps to debug this revealed that it was definitely the
`find_package(Git REQUIRED)` step that was stalling. I have not been able to
root cause what is going on, but some educated guesses:

  1. A CMake FindGit.cmake bug? This could certainly cause the described
     behavior, but I cannot find anything online to corroborate this and cannot
     see anything in the upstream history of this file¹ that looks like a fix
     for something like this.

  2. Installing a version of CMake via Choco and then running it via Cygwin
     causes some bad Windows/UNIX interaction? Perhaps, but I cannot find any
     corroborating evidence for this either. Also, I cannot guess why such a
     thing would _only_ cause problems in FindGit.cmake.

  3. FindGit.cmake is picking up a Visual Studio shim for Git that responds in a
     way that confuses the `find_package` check? I found vague hints about a
     shim like this online, but I still cannot explain why this would cause a
     stall.

A work around for this is to use the less nuanced `find_program`. This has no
negative impact on the CMake setup because (1) all we are attempting to detect
is the `git` binary itself and (2) the CMake files never call `git` directly
anyway; we are performing this detection to avoid gen_version.py failing
cryptically.

Note that it is not possible to use `REQUIRED` in this `find_program` directive
because this was only added in CMake 3.18 and we currently only require CMake
3.1.

This also re-enables the Cygwin CMake CI task now that it no longer stalls.

Fixes #2145.

¹ https://github.com/Kitware/CMake/commits/master/Modules/FindGit.cmake

3 years agoMerge branch 'smattr/065AF9DF-1978-4495-B168-76EF5C1C3D39' into 'main'
Matthew Fernandez [Sun, 14 Nov 2021 17:51:59 +0000 (17:51 +0000)]
Merge branch 'smattr/065AF9DF-1978-4495-B168-76EF5C1C3D39' into 'main'

consolidate release artifacts, reducing count to below 50

Closes #2147

See merge request graphviz/graphviz!2279

3 years agostop producing MD5 checksums of release artifacts
Matthew Fernandez [Thu, 11 Nov 2021 16:09:12 +0000 (08:09 -0800)]
stop producing MD5 checksums of release artifacts

This is part of a goal to reduce release artifacts to ≤50 files so the list of
files is not truncated in Gitlab pages. MD5 is an obsolete checksum format that
has been deprecated for many years. This commit removes these checksums from
being produced in the deployment flow, leaving SHA256 checksums as the only
option. This is consistent with Gitlab’s Generic Package Registry that provides
an alternative way of seeing file checksums and also only offers SHA256.

This change reduces the number of release artifacts from 56 to 46.

Closes #2147.

3 years agoremove 'os' directory from packaging hierarchy
Matthew Fernandez [Thu, 11 Nov 2021 04:44:30 +0000 (20:44 -0800)]
remove 'os' directory from packaging hierarchy

Now that nothing is written to the sibling `debug` and `source` directories,
there does not seem to be an advantage to retaining this level in the hierarchy.

3 years agostop exporting tarballs of static builds as artifacts
Matthew Fernandez [Tue, 9 Nov 2021 05:45:37 +0000 (21:45 -0800)]
stop exporting tarballs of static builds as artifacts

These are not consumed by any dependent job. This drops the total number of
Graphviz release artifacts from 58 to 56.

Related to #2147.

3 years agoremove DEB exporting from CI static build tasks
Matthew Fernandez [Tue, 9 Nov 2021 05:44:38 +0000 (21:44 -0800)]
remove DEB exporting from CI static build tasks

Neither of these tasks produce any DEB files.

3 years agorename CMake-produced DEB t *-cmake to disambiguate
Matthew Fernandez [Thu, 11 Nov 2021 01:28:39 +0000 (17:28 -0800)]
rename CMake-produced DEB t *-cmake to disambiguate

Now that the Autotools-produced DEBs are consolidated into tarballs, someone
looking at a flat list of all the release artifacts could incorrectly conclude
that Graphviz-${GV_VERSION}-Linux.deb is an alternative complete package to the
tarballs. Renaming this makes it clearer that it originates from the CMake build
system and is incomplete.

Note that this also removes the `os` hierarchy in the packaging directories for
these artifacts. All DEB artifacts are now produced without any
`os`/`debug`/`source` subdirectory.

Related to #2147.

3 years agofurther consolidate DEBs into a single tarball per OS
Matthew Fernandez [Wed, 10 Nov 2021 01:01:19 +0000 (17:01 -0800)]
further consolidate DEBs into a single tarball per OS

Taking the previous approach further, this results in the following release
artifacts being combined:

  * Ubuntu 18.04
    * 13 DEBs, 10 debug DEBs → 1 tarball
  * Ubuntu 20.04
    * 13 DEBs, 10 debug DEBs → 1 tarball
  * Ubuntu 20.04 debug
    * 13 DEBs, 10 debug DEBs → 1 tarball
  * Ubuntu 21.04
    * 13 DEBs, 10 debug DEBs → 1 tarball
  * Ubuntu 21.10
    * 13 DEBs, 10 debug DEBs → 1 tarball

This drops the total number of Graphviz release artifacts from 63 to 58. This is
still not below the 50 artifact ceiling we need to hit, but this is progress.

Note that this removes the `os`/`debug`/`source` hierarchy in the packaging
directories for these artifacts, now that all three of these are packaged into a
single tarball. The `os` hierarchy remains for the CMake-produced DEB for these
platforms.

Related to #2147.

3 years agopackage DEBs as consolidated tarballs
Matthew Fernandez [Tue, 9 Nov 2021 04:39:13 +0000 (20:39 -0800)]
package DEBs as consolidated tarballs

This results in the following release artifacts being combined:

  * Ubuntu 18.04
    * 13 DEBs → 1 tarball
    * 10 debug DEBs → 1 tarball
  * Ubuntu 20.04
    * 13 DEBs → 1 tarball
    * 10 debug DEBs → 1 tarball
  * Ubuntu 20.04 debug
    * 13 DEBs → 1 tarball
    * 10 debug DEBs → 1 tarball
  * Ubuntu 21.04
    * 13 DEBs → 1 tarball
    * 10 debug DEBs → 1 tarball
  * Ubuntu 21.10
    * 13 DEBs → 1 tarball
    * 10 debug DEBs → 1 tarball

This drops the total number of Graphviz release artifacts from 168 to 63. This
is still not below the 50 artifact ceiling we need to hit, but this is
significant progress.

Related to #2147.

3 years agorename CMake-produced RPM to *-cmake to disambiguate
Matthew Fernandez [Sun, 7 Nov 2021 00:15:28 +0000 (17:15 -0700)]
rename CMake-produced RPM to *-cmake to disambiguate

Now that the Autotools-produced RPMs are consolidated into tarballs, someone
looking at a flat list of all the release artifacts could incorrectly conclude
that Graphviz-${GV_VERSION}-Linux.rpm is an alternative complete package to the
tarballs. Renaming this makes it clearer that it originates from the CMake build
system and is incomplete.

Note that this also removes the `os` hierarchy in the packaging directories for
these artifacts. All RPM artifacts are now produced without any
`os`/`debug`/`source` subdirectory.

Related to #2147.

3 years agofurther consolidate RPMs into a single tarball per OS
Matthew Fernandez [Tue, 9 Nov 2021 15:25:09 +0000 (07:25 -0800)]
further consolidate RPMs into a single tarball per OS

Taking the previous approach further, this results in the following release
artifacts being combined:

  * CentOS 7
    * 1 source RPM, 2 tarballs → 1 tarball
  * CentOS 8
    * 1 source RPM, 2 tarballs → 1 tarball
  * Fedora 33
    * 1 source RPM, 2 tarballs → 1 tarball
  * Fedora 34
    * 1 source RPM, 2 tarballs → 1 tarball

This drops the total number of Graphviz release artifacts from 176 to 168. This
is still not below the 50 artifact ceiling we need to hit, but this is progress.

Note that this removes the `os`/`debug`/`source` hierarchy in the packaging
directories for these artifacts, now that all three of these are packaged into a
single tarball. The `os` hierarchy remains for the CMake-produced RPM for these
platforms.

Related to #2147.

3 years agopackage RPMs as consolidated tarballs
Matthew Fernandez [Sat, 6 Nov 2021 17:28:00 +0000 (10:28 -0700)]
package RPMs as consolidated tarballs

This results in the following release artifacts being combined:

  * CentOS 7
    * 1 debug RPMs → 1 tarball
    * 22 other RPMs → 1 tarball
  * CentOS 8
    * 20 debug RPMs → 1 tarball
    * 23 other RPMs → 1 tarball
  * Fedora 33
    * 25 debug RPMs → 1 tarball
    * 28 other RPMs → 1 tarball
  * Fedora 34
    * 25 debug RPMs → 1 tarball
    * 28 other RPMs → 1 tarball

This drops the total number of Graphviz release artifacts from 340 to 176. This
is still not below the 50 artifact ceiling we need to hit, but this is
significant progress.

Related to #2147.

3 years agoremove configure.log artifact export from CI tasks that do not produce a log
Matthew Fernandez [Wed, 10 Nov 2021 01:01:41 +0000 (17:01 -0800)]
remove configure.log artifact export from CI tasks that do not produce a log

3 years agoMerge branch 'smattr/F13008F4-0953-4C2A-8080-DCDF139C824E' into 'main'
Matthew Fernandez [Wed, 10 Nov 2021 15:45:28 +0000 (15:45 +0000)]
Merge branch 'smattr/F13008F4-0953-4C2A-8080-DCDF139C824E' into 'main'

some clean up of `free` usage

See merge request graphviz/graphviz!2267

3 years agoLinkedList.c: remove commented out code
Matthew Fernandez [Sat, 6 Nov 2021 00:28:52 +0000 (17:28 -0700)]
LinkedList.c: remove commented out code

3 years agoNodePrint: remove an unnecessary cast
Matthew Fernandez [Sat, 6 Nov 2021 00:28:42 +0000 (17:28 -0700)]
NodePrint: remove an unnecessary cast

3 years agocomp_scan_points: remove unnecessary casts
Matthew Fernandez [Sat, 6 Nov 2021 00:28:25 +0000 (17:28 -0700)]
comp_scan_points: remove unnecessary casts

3 years agoremove 'FREE' abstraction
Matthew Fernandez [Sat, 6 Nov 2021 00:26:48 +0000 (17:26 -0700)]
remove 'FREE' abstraction

This #define was not conditional (it was always set to `free`) and was not used
consistently (there were still direct calls to `free` in some places that should
have used this macro), incorrectly giving the impression that it could be safely
swapped for another function.

3 years agoremove guards on calls to 'free'
Matthew Fernandez [Sat, 6 Nov 2021 00:09:15 +0000 (17:09 -0700)]
remove guards on calls to 'free'

It is a no-op to call `free(NULL)`, so we can rephrase this code into something
more concise and simple.

3 years agodtclose: remove an unnecessary cast
Matthew Fernandez [Sat, 6 Nov 2021 00:05:19 +0000 (17:05 -0700)]
dtclose: remove an unnecessary cast

3 years agoMerge branch 'smattr/47a39b74-0b69-45f8-b85f-a74a3971ec93' into 'main'
Matthew Fernandez [Wed, 10 Nov 2021 07:00:27 +0000 (07:00 +0000)]
Merge branch 'smattr/47a39b74-0b69-45f8-b85f-a74a3971ec93' into 'main'

more warning squashing

See merge request graphviz/graphviz!2269

3 years agonodeIntersect: remove unused 'itarget' parameter
Matthew Fernandez [Sun, 7 Nov 2021 01:37:03 +0000 (18:37 -0700)]
nodeIntersect: remove unused 'itarget' parameter

3 years agonodeIntersect: remove unused 'explicit_itarget' parameter
Matthew Fernandez [Sun, 7 Nov 2021 01:35:57 +0000 (18:35 -0700)]
nodeIntersect: remove unused 'explicit_itarget' parameter

3 years agonodeIntersect: remove unused 'itooltip' parameter
Matthew Fernandez [Sun, 7 Nov 2021 01:34:54 +0000 (18:34 -0700)]
nodeIntersect: remove unused 'itooltip' parameter

3 years agononefunc: squash -Wunused-parameter warnings
Matthew Fernandez [Sun, 7 Nov 2021 01:32:25 +0000 (18:32 -0700)]
nonefunc: squash -Wunused-parameter warnings

3 years agoedge_in_layer: remove unused 'g' parameter
Matthew Fernandez [Sun, 7 Nov 2021 01:31:21 +0000 (18:31 -0700)]
edge_in_layer: remove unused 'g' parameter

3 years agosetup_page: remove unused 'g' parameter
Matthew Fernandez [Sun, 7 Nov 2021 01:30:38 +0000 (18:30 -0700)]
setup_page: remove unused 'g' parameter

3 years agoremove prototypes for unimplemented render.h functions
Matthew Fernandez [Sun, 7 Nov 2021 01:25:35 +0000 (18:25 -0700)]
remove prototypes for unimplemented render.h functions

3 years agoparse_layerselect: remove unused 'g' parameter
Matthew Fernandez [Sun, 7 Nov 2021 01:23:05 +0000 (18:23 -0700)]
parse_layerselect: remove unused 'g' parameter

3 years agocharacterData: squash -Wunused-parameter warning
Matthew Fernandez [Sun, 7 Nov 2021 01:21:04 +0000 (18:21 -0700)]
characterData: squash -Wunused-parameter warning

3 years agoendElement: squash -Wunused-parameter warning
Matthew Fernandez [Sun, 7 Nov 2021 01:20:14 +0000 (18:20 -0700)]
endElement: squash -Wunused-parameter warning

3 years agomkFont: remove unused 'ul' parameter
Matthew Fernandez [Sun, 7 Nov 2021 01:19:38 +0000 (18:19 -0700)]
mkFont: remove unused 'ul' parameter

3 years agofdp_extra_args: remove unused 'gvc' parameter
Matthew Fernandez [Sun, 7 Nov 2021 01:05:47 +0000 (18:05 -0700)]
fdp_extra_args: remove unused 'gvc' parameter

3 years agoneato_extra_args: remove unused 'gvc' parameter
Matthew Fernandez [Sun, 7 Nov 2021 01:04:46 +0000 (18:04 -0700)]
neato_extra_args: remove unused 'gvc' parameter

3 years agomemtest_extra_args: remove unused 'gvc' parameter
Matthew Fernandez [Sun, 7 Nov 2021 01:03:40 +0000 (18:03 -0700)]
memtest_extra_args: remove unused 'gvc' parameter

3 years agoMerge branch 'smattr/2A44CEC9-C5B1-46E0-96F1-3174C9BE6A68' into 'main'
Matthew Fernandez [Wed, 10 Nov 2021 05:57:42 +0000 (05:57 +0000)]
Merge branch 'smattr/2A44CEC9-C5B1-46E0-96F1-3174C9BE6A68' into 'main'

smyrna: more dead code removal

See merge request graphviz/graphviz!2268

3 years agosmyrna: remove unused 'visibility' refresh filter field
Matthew Fernandez [Sun, 7 Nov 2021 00:06:49 +0000 (17:06 -0700)]
smyrna: remove unused 'visibility' refresh filter field

3 years agosmyrna: remove unused camera 'index' field
Matthew Fernandez [Sun, 7 Nov 2021 00:03:21 +0000 (17:03 -0700)]
smyrna: remove unused camera 'index' field

3 years agosmyrna: remove unused 'type' camera field
Matthew Fernandez [Sun, 7 Nov 2021 00:01:50 +0000 (17:01 -0700)]
smyrna: remove unused 'type' camera field

3 years agosmyrna: remove unused 'temp'
Matthew Fernandez [Sat, 6 Nov 2021 23:59:10 +0000 (16:59 -0700)]
smyrna: remove unused 'temp'

3 years agosmyrna: remove unused graph data 'Modified' field
Matthew Fernandez [Sat, 6 Nov 2021 23:54:44 +0000 (16:54 -0700)]
smyrna: remove unused graph data 'Modified' field

3 years agosmyrna: remove unused graph data offset fields
Matthew Fernandez [Sat, 6 Nov 2021 23:54:01 +0000 (16:54 -0700)]
smyrna: remove unused graph data offset fields

3 years agosmyrna: remove unused edge 'printLabel' field
Matthew Fernandez [Sat, 6 Nov 2021 23:50:41 +0000 (16:50 -0700)]
smyrna: remove unused edge 'printLabel' field

3 years agosmyrna: remove unused edge 'visible' fields
Matthew Fernandez [Sat, 6 Nov 2021 23:49:25 +0000 (16:49 -0700)]
smyrna: remove unused edge 'visible' fields

3 years agosmyrna: remove unused OD macros
Matthew Fernandez [Sat, 6 Nov 2021 23:46:10 +0000 (16:46 -0700)]
smyrna: remove unused OD macros

3 years agosmyrna: remove unused 'xdot_set'
Matthew Fernandez [Sat, 6 Nov 2021 23:45:12 +0000 (16:45 -0700)]
smyrna: remove unused 'xdot_set'

3 years agoMerge branch 'smattr/76717b9c-884a-4d8e-bd93-d9386982d2ae' into 'main'
Matthew Fernandez [Wed, 10 Nov 2021 03:40:58 +0000 (03:40 +0000)]
Merge branch 'smattr/76717b9c-884a-4d8e-bd93-d9386982d2ae' into 'main'

fix mismatch of calling conventions in delaunay.c

See merge request graphviz/graphviz!2271

3 years agodelaunay.c: remove unnecessary parens
Matthew Fernandez [Sun, 7 Nov 2021 20:23:18 +0000 (12:23 -0800)]
delaunay.c: remove unnecessary parens

3 years agomkSurface: fix mismatch of calling convention in 'addFace'
Matthew Fernandez [Sun, 7 Nov 2021 20:12:53 +0000 (12:12 -0800)]
mkSurface: fix mismatch of calling convention in 'addFace'

The compiler said about this code:

  delaunay.c:484:34: warning: cast between incompatible function types from
    ‘void (*)(GFace *, fstate *)’ {aka ‘void (*)(struct <anonymous> *, struct
    <anonymous> *)’} to ‘gint (*)(void *, void *)’ {aka ‘int (*)(void *,
    void *)’} [-Wcast-function-type]
       gts_surface_foreach_face (s, (GtsFunc) addFace, &statf);
                                    ^

Similar to the prior commit, this was relying on a coincident return value of 0
from the callback function.

3 years agoget_triangles: fix mismatch of calling convention in 'addTri'
Matthew Fernandez [Sun, 7 Nov 2021 20:07:00 +0000 (12:07 -0800)]
get_triangles: fix mismatch of calling convention in 'addTri'

The compiler said about this code:

  delaunay.c:518:34: warning: cast between incompatible function types from
    ‘void (*)(GFace *, fstate *)’ {aka ‘void (*)(struct <anonymous> *, struct
    <anonymous> *)’} to ‘gint (*)(void *, void *)’ {aka
    ‘int (*)(void *, void *)’} [-Wcast-function-type]
       gts_surface_foreach_face (s, (GtsFunc) addTri, &statf);
                                    ^

Similar to the prior commit, this was relying on a coincident return value of 0
from the callback function.

3 years agomkSurface/get_triangles: fix mismatch of calling convention in 'cntFace'
Matthew Fernandez [Sun, 7 Nov 2021 20:01:23 +0000 (12:01 -0800)]
mkSurface/get_triangles: fix mismatch of calling convention in 'cntFace'

The compiler said about this code:

  delaunay.c:477:34: warning: cast between incompatible function types from
    ‘void (*)(GFace *, int *)’ {aka ‘void (*)(struct <anonymous> *, int *)’} to
    ‘gint (*)(void *, void *)’ {aka ‘int (*)(void *, void *)’}
    [-Wcast-function-type]
       gts_surface_foreach_face (s, (GtsFunc) cntFace, &nfaces);
                                    ^

Similar to the prior commit, this was relying on a coincident return value of 0
from the callback function.

3 years agodelaunay_tri/mkSurface: fix mismatch of calling convention in 'addEdge'
Matthew Fernandez [Sun, 7 Nov 2021 19:55:50 +0000 (11:55 -0800)]
delaunay_tri/mkSurface: fix mismatch of calling convention in 'addEdge'

The compiler said about this code:

  delaunay.c:355:31: warning: cast between incompatible function types from
    ‘void (*)(GtsSegment *, estate *)’ {aka ‘void (*)(struct _GtsSegment *,
    struct <anonymous> *)’} to ‘gint (*)(void *, void *)’ {aka
    ‘int (*)(void *, void *)’} [-Wcast-function-type]
    gts_surface_foreach_edge (s, (GtsFunc) addEdge, &state);
                                 ^

Similar to the prior commit, this was relying on a coincident return value of 0
from the callback function.

3 years agoaddFace: fix mismatch of calling convention in callback
Matthew Fernandez [Sun, 7 Nov 2021 19:40:52 +0000 (11:40 -0800)]
addFace: fix mismatch of calling convention in callback

The compiler said about this code:

  delaunay.c: In function ‘addFace’:
  delaunay.c:428:48: warning: cast between incompatible function types from
    ‘void (*)(GFace *, ninfo *)’ {aka ‘void (*)(struct <anonymous> *, struct
    <anonymous> *)’} to ‘gint (*)(void *, void *)’ {aka ‘int (*)(void *,
    void *)’} [-Wcast-function-type]
       gts_face_foreach_neighbor ((GtsFace*)f, 0, (GtsFunc) addNeighbor, &ni);
                                                  ^

Similar to the prior commit, this was relying on a coincident return value of 0
from the callback function.

3 years agodelaunay_triangulation: fix mismatch of calling convention in callback
Matthew Fernandez [Sun, 7 Nov 2021 19:25:21 +0000 (11:25 -0800)]
delaunay_triangulation: fix mismatch of calling convention in callback

The compiler said about this code:

  delaunay.c:286:34: warning: cast between incompatible function types from
    ‘void (*)(GtsSegment *, v_data *)’ {aka ‘void (*)(struct _GtsSegment *,
    struct <anonymous> *)’} to ‘gint (*)(void *, void *)’ {aka
    ‘int (*)(void *, void *)’} [-Wcast-function-type]
       gts_surface_foreach_edge (s, (GtsFunc) add_edge, delaunay);
                                    ^

Similar to the prior commit, this was relying on a coincident return value of 0
from the callback function.

3 years agogts_surface_foreach_edge: fix mismatch of calling convention in callback
Matthew Fernandez [Sun, 7 Nov 2021 19:20:08 +0000 (11:20 -0800)]
gts_surface_foreach_edge: fix mismatch of calling convention in callback

The compiler said about this code:

  delaunay.c: In function ‘edgeStats’:
  delaunay.c:245:34: warning: cast between incompatible function types from
    ‘void (*)(GtsSegment *, estats *)’ {aka ‘void (*)(struct _GtsSegment *,
    struct <anonymous> *)’} to ‘gint (*)(void *, void *)’ {aka
    ‘int (*)(void *, void *)’} [-Wcast-function-type]
       gts_surface_foreach_edge (s, (GtsFunc) cnt_edge, sp);
                                    ^

This is not quite as bad as the previous instance of this fixed. However, it
seems to have been relying on a coincident return value. E.g. on x86-64 this
code relies on 0 ending up in `RAX` at the end of the callback to indicate
iteration should continue, despite `cnt_edge` having no declared return value.

3 years agotri: remove shadowing of 'v1'
Matthew Fernandez [Sun, 7 Nov 2021 19:12:53 +0000 (11:12 -0800)]
tri: remove shadowing of 'v1'

3 years agodelaunay_triangulation: make static
Matthew Fernandez [Sun, 7 Nov 2021 19:05:41 +0000 (11:05 -0800)]
delaunay_triangulation: make static

This function is not used outside of its containing file.

3 years agodelaunay_remove_holes: fix mismatch of calling convention in callback
Matthew Fernandez [Sun, 7 Nov 2021 18:54:58 +0000 (10:54 -0800)]
delaunay_remove_holes: fix mismatch of calling convention in callback

The compiler said about this code:

  delaunay.c: In function ‘delaunay_remove_holes’:
  delaunay.c:45:9: warning: cast between incompatible function types from
    ‘gboolean (*)(GtsTriangle *)’ {aka ‘int (*)(struct _GtsTriangle *)’}
    to ‘gint (*)(void *, void *)’ {aka ‘int (*)(void *, void *)’}
    [-Wcast-function-type]
         (GtsFunc) triangle_is_hole, NULL);

This warning is not spurious. In particular, the mismatch in the number of
arguments passed to the callback means the callback function has a different
calling convention than expected by the code calling it. The result of this can
be stack corruption or incorrect interpretation of function arguments.

In practice, all major native calling conventions use registers for both
function types, so this is somewhat benign. However, this likely caused problems
on stack-based environments like WASM and JITs.

3 years agoMerge branch 'smattr/08BD9B6E-60A9-44CE-A4F8-7AFA9DBF563C' into 'main'
Matthew Fernandez [Wed, 10 Nov 2021 02:16:14 +0000 (02:16 +0000)]
Merge branch 'smattr/08BD9B6E-60A9-44CE-A4F8-7AFA9DBF563C' into 'main'

remove 'COLLECTION' from the packaging hierarchy

Closes #2148

See merge request graphviz/graphviz!2270

3 years agogenerate_configuration_table.py: standardize on string with double quoting
Matthew Fernandez [Sun, 7 Nov 2021 04:11:20 +0000 (21:11 -0700)]
generate_configuration_table.py: standardize on string with double quoting