]>
granicus.if.org Git - graphviz/log
Matthew Fernandez [Wed, 18 Jan 2023 16:33:01 +0000 (08:33 -0800)]
neatogen: squash a -Wundef warning for 'DEBUG'
Matthew Fernandez [Wed, 18 Jan 2023 16:30:16 +0000 (08:30 -0800)]
neatogen compute_new_weights: remove redundant zeroing
The `gv_calloc` allocation does this for us.
Matthew Fernandez [Wed, 18 Jan 2023 16:30:02 +0000 (08:30 -0800)]
neatogen common_neighbors: fix comment typo
Matthew Fernandez [Wed, 18 Jan 2023 16:29:46 +0000 (08:29 -0800)]
neatogen common_neighbors: remove unused 'v' parameter
Matthew Fernandez [Wed, 18 Jan 2023 16:24:45 +0000 (08:24 -0800)]
mingle nearest_neighbor_graph: squash warnings when building without libANN
Matthew Fernandez [Wed, 18 Jan 2023 16:24:14 +0000 (08:24 -0800)]
mingle nearest_neighbor_graph: fix typo in parameter name
Matthew Fernandez [Wed, 18 Jan 2023 16:22:35 +0000 (08:22 -0800)]
mingle edge_bundling: squash compilation warnings when building without libANN
Matthew Fernandez [Sun, 22 Jan 2023 00:16:51 +0000 (00:16 +0000)]
Merge branch 'smattr/gitlab-2338' into 'main'
sfio: make 'Sfio_t' definition entirely internal
Closes #2338
See merge request graphviz/graphviz!3060
Matthew Fernandez [Thu, 19 Jan 2023 16:24:02 +0000 (08:24 -0800)]
sfio: make 'Sfio_t' definition entirely internal
The definition of `Sfio_t` was structured to give it a public part and a private
part:
struct _sfio_s {
… public members …
_SFIO_PRIVATE; // ← only visible if sfio_t.h is included
};
This works only as long as no user ever allocates a `Sfio_t` themselves. If they
do, they will allocate too few bytes, based on their view of the size of
`Sfio_t` missing its private members.
A side effect of link-time optimization is that the compiler can see through
this trickery and witness both with-private and without-private definitions at
once. Creating objects of this type or pointers to objects of this type is a
violation of C’s strict aliasing rule and the compiler can now see this. This
can cause the compiler to make unsafe optimizations, like concluding any code
involving `Sfio_t*` variables must be unreachable.
The safer way to do a public/private class like this is with two structs, the
private one containing the public one as a member:
struct foo_public {
… public members …
};
struct foo_private {
struct foo_public *public;
… private members …
};
Public API functions then accept `struct foo_public*` parameters and internally
convert them to `struct foo_private*` variables in order to access the
internals:
int foo_do_something(struct foo_public *foo) {
// use something like the Linux kernel’s container_of
struct foo_private *f = container_of(foo, public);
…
}
But instead of this, we can observe that the definition of `Sfio_t` does not
need to have any public members at all, and we can make the entire type private.
We need an exception for libexpr which reaches into sfio internals.
Gitlab: fixes #2338
Matthew Fernandez [Thu, 19 Jan 2023 16:17:29 +0000 (08:17 -0800)]
sfio: remove macro implementations of character functions
These were implemented as an optimization to allow inlining. This is no longer
necessary on contemporary compilers with link-time optimization. Removing them
will unblock fixing some strict aliasing problems with the `Sfio_t` type.
Gitlab: #2338
Matthew Fernandez [Thu, 19 Jan 2023 16:13:22 +0000 (08:13 -0800)]
sfio: fix missing SFIO components
These are present in the Autotools build system as a separate library, libsfiof,
linked into libsfio. They are also present in the MS Build build system inlined
into libsfio itself. This change copies the MS Build approach.
This did not cause problems because these sources only exist as fallback
implementations for functions that are also implemented as macros. All current
usages see the macro definitions so never call these functions.
Fixing this will allow removing the macro versions in an upcoming change.
Matthew Fernandez [Thu, 19 Jan 2023 15:59:51 +0000 (07:59 -0800)]
sfio: remove some open coded nulls
Matthew Fernandez [Sat, 21 Jan 2023 22:34:15 +0000 (22:34 +0000)]
Merge branch 'smattr/
9a877cda -3948-40d1-8ddf-
64d09bc05660 ' into 'main'
smyrna, gvmap warning squashing
See merge request graphviz/graphviz!3061
Matthew Fernandez [Fri, 20 Jan 2023 16:25:15 +0000 (08:25 -0800)]
gvmap plot_dot_polygons: use a 'size_t' for 'maxlen'
Squashes some -Wsign-conversion warnings.
Matthew Fernandez [Fri, 20 Jan 2023 16:10:23 +0000 (08:10 -0800)]
gvmap make_map_internal: remove shadowing of 'nz' local
Matthew Fernandez [Fri, 20 Jan 2023 16:05:58 +0000 (08:05 -0800)]
gvmap make_map_internal: operate directly on 'xcombined' instead of 'xtemp'
Nothing appears to alias `xcombined` within this block. So we can save an
intermediate allocation and the cost of data movement by simply writing results
into their final destination.
Matthew Fernandez [Fri, 20 Jan 2023 15:59:32 +0000 (07:59 -0800)]
gvmap get_polygon_solids: remove unused 'x_poly' parameter
Matthew Fernandez [Fri, 20 Jan 2023 15:55:00 +0000 (07:55 -0800)]
smyrna on_txtAttr_changed: squash -Wunused-parameter warning
This function is used as a callback, so the parameter cannot easily be removed.
Matthew Fernandez [Sat, 21 Jan 2023 21:42:38 +0000 (21:42 +0000)]
Merge branch 'smattr/
48b6e6c6 -75e1-4359-a9d7-
eed440bfcf03 ' into 'main'
gvrender_core_pic.c: Distinguish between PIC and troff comments
Closes #2341
See merge request graphviz/graphviz!3063
Matthew Fernandez [Sat, 21 Jan 2023 19:30:41 +0000 (11:30 -0800)]
add a changelog entry for the prior fix
Gitlab: fixes #2341
Reported-by: Philip Kaludercic <philipk@posteo.net>
Philip Kaludercic [Tue, 10 Jan 2023 23:31:13 +0000 (00:31 +0100)]
gvrender_core_pic.c: Distinguish between PIC and troff comments
Matthew Fernandez [Sat, 21 Jan 2023 19:23:40 +0000 (11:23 -0800)]
add a test case for #2341
Matthew Fernandez [Sat, 21 Jan 2023 20:49:02 +0000 (20:49 +0000)]
Merge branch 'smattr/
f05e3fc0 -e087-4e7c-b988-
577ed0336677 ' into 'main'
Start 7.1.1 development
See merge request graphviz/graphviz!3062
Matthew Fernandez [Sat, 21 Jan 2023 19:58:26 +0000 (11:58 -0800)]
Start 7.1.1 development
Matthew Fernandez [Sat, 21 Jan 2023 19:56:31 +0000 (19:56 +0000)]
Merge branch 'smattr/
68782f21 -a0fd-4857-b70a-
1ce1504a5446 ' into 'main'
Stable release 7.1.0
See merge request graphviz/graphviz!3055
Matthew Fernandez [Sun, 15 Jan 2023 22:49:28 +0000 (14:49 -0800)]
Stable Release 7.1.0
Matthew Fernandez [Sun, 15 Jan 2023 22:47:50 +0000 (14:47 -0800)]
bump minor version number for the addition of '--help', '--version'
Magnus Jacobsson [Sat, 21 Jan 2023 15:29:43 +0000 (15:29 +0000)]
Merge branch 're-enable-cygwin' into 'main'
Revert "CI: disable Cygwin jobs"
Closes #2329
See merge request graphviz/graphviz!3054
Magnus Jacobsson [Sun, 15 Jan 2023 11:37:14 +0000 (12:37 +0100)]
Revert "CI: disable Cygwin jobs"
This reverts commit
709acef44e13332a3c961bed3a2478c002f7b25f .
Matthew Fernandez [Sat, 21 Jan 2023 05:39:14 +0000 (05:39 +0000)]
Merge branch 'smattr/
dc382b2a -6441-4f7b-a3a0-
a66d40319ea8 ' into 'main'
compiler warning squashing, fix a memory leak, remove some 'sprintf'
See merge request graphviz/graphviz!3056
Matthew Fernandez [Sun, 15 Jan 2023 22:20:06 +0000 (14:20 -0800)]
common graph_init: fix memory leak
Gitlab: #1950
Matthew Fernandez [Sun, 15 Jan 2023 22:13:19 +0000 (14:13 -0800)]
gvcolor nameOf: use an agxbuf instead of raw char buffer for names
This leads to slightly simpler code and fewer things to worry about.
Gitlab: #1950
Matthew Fernandez [Sun, 15 Jan 2023 21:58:56 +0000 (13:58 -0800)]
gvcolor: remove assumption that color values fit in 64 characters
This code is still pretty challenging to follow, but at least we remove one
more thing the reader had to worry about.
Gitlab: #1950
Matthew Fernandez [Sun, 15 Jan 2023 21:40:22 +0000 (13:40 -0800)]
gvcolor: remove unused 'Agnodeinfo_t' name
Matthew Fernandez [Sun, 15 Jan 2023 21:39:40 +0000 (13:39 -0800)]
gvcolor: remove unused 'hsbcolor_t' name
Matthew Fernandez [Sun, 15 Jan 2023 21:38:55 +0000 (13:38 -0800)]
gvcolor: squash -Wmissing-prototypes warning
Matthew Fernandez [Sun, 15 Jan 2023 21:29:38 +0000 (13:29 -0800)]
gvcolor colorxlate: remove unused return value
Matthew Fernandez [Sun, 15 Jan 2023 21:28:12 +0000 (13:28 -0800)]
gvcolor: remove 'NOCOLORNAMES' code path
Nothing in the build systems define this. Furthermore, this code does not work.
It reads uninitialized memory from `buf`.
Matthew Fernandez [Sun, 15 Jan 2023 23:07:22 +0000 (23:07 +0000)]
Merge branch 'smattr/
c0d7ef68 -360e-47ba-96a8-
fa27138de3b9 ' into 'main'
GD plugin gd_alternate_fontlist: fix unchecked allocation
See merge request graphviz/graphviz!3051
Matthew Fernandez [Sun, 15 Jan 2023 03:18:53 +0000 (19:18 -0800)]
GD plugin gd_alternate_fontlist: fix unchecked allocation
This function was calling `realloc` and not checking the return value. To fix
this, we rephrase it into using string views and then a final checked
allocation. This removes the long lived static allocation here, now requiring
the caller to free the returned value. This function is not on a hot path, so
removing this optimization is fine.
Matthew Fernandez [Sun, 15 Jan 2023 22:01:51 +0000 (22:01 +0000)]
Merge branch 'smattr/
50a7856c -303a-4293-ad75-
d1c983ace0f7 ' into 'main'
tclpkg buildBindings: fix incorrect allocation calculations and unchecked allocations
See merge request graphviz/graphviz!3052
Matthew Fernandez [Sun, 15 Jan 2023 04:22:10 +0000 (20:22 -0800)]
tclpkg buildBindings: mark 's2' parameter as const
Matthew Fernandez [Sun, 15 Jan 2023 04:19:04 +0000 (20:19 -0800)]
tclpkg buildBindings: fix remaining unchecked allocations
Matthew Fernandez [Sun, 15 Jan 2023 04:15:30 +0000 (20:15 -0800)]
tclpkg buildBindings: swap unchecked allocation for agxbuf
Apart from fixing an unchecked allocation, this is shorter with fewer things to
worry about.
Matthew Fernandez [Sun, 15 Jan 2023 04:11:12 +0000 (20:11 -0800)]
tclpkg buildBindings: fix incorrect allocation calculations
From context, these appear to be attempting to account for the trailing '\0'.
But they allocate one too many bytes.
Matthew Fernandez [Sun, 15 Jan 2023 18:41:39 +0000 (18:41 +0000)]
Merge branch 'smattr/
e1a77fd6 -85ed-4678-9fbe-
bb6276c7e71b ' into 'main'
sprintf migration and compiler waring squashing
See merge request graphviz/graphviz!3050
Matthew Fernandez [Sun, 15 Jan 2023 00:09:41 +0000 (16:09 -0800)]
graphml2gv main: remove shadowing of 'G'
Matthew Fernandez [Sat, 14 Jan 2023 23:32:18 +0000 (15:32 -0800)]
graphml2gv initargs: squash -Wswitch-default warning
The default case is unreachable due to the preceding `getopt` call.
Matthew Fernandez [Sun, 15 Jan 2023 00:07:13 +0000 (16:07 -0800)]
graphml2gv graphml_to_gv: remove shadowing of 'gname'
Matthew Fernandez [Sat, 14 Jan 2023 23:32:18 +0000 (15:32 -0800)]
gv2gml initargs: squash -Wswitch-default warning
The default case is unreachable due to the preceding `getopt` call.
Matthew Fernandez [Sat, 14 Jan 2023 23:32:18 +0000 (15:32 -0800)]
dijkstra init: squash -Wswitch-default warning
The default case is unreachable due to the preceding `getopt` call.
Matthew Fernandez [Sat, 14 Jan 2023 23:32:18 +0000 (15:32 -0800)]
unflatten scanargs: squash -Wswitch-default warning
The default case is unreachable due to the preceding `getopt` call.
Matthew Fernandez [Sat, 14 Jan 2023 23:32:18 +0000 (15:32 -0800)]
tred init: squash -Wswitch-default warning
The default case is unreachable due to the preceding `getopt` call.
Matthew Fernandez [Sat, 14 Jan 2023 23:32:18 +0000 (15:32 -0800)]
sccmap scanArgs: squash -Wswitch-default warning
The default case is unreachable due to the preceding `getopt` call.
Matthew Fernandez [Sat, 14 Jan 2023 23:52:55 +0000 (15:52 -0800)]
ccomps process: replace 'sprintf' with 'agxbprint'
This replaces some error prone manual calculation with a dynamic buffer that
handles the calculation of needed allocations. This also potentially saves
memory in cases of short strings where an agxbuf can use inline storage.
Gitlab: #1950
Matthew Fernandez [Sat, 14 Jan 2023 23:52:55 +0000 (15:52 -0800)]
ccomps processClusters: replace 'sprintf' with 'agxbprint'
This replaces some error prone manual calculation with a dynamic buffer that
handles the calculation of needed allocations. This also potentially saves
memory in cases of short strings where an agxbuf can use inline storage.
Gitlab: #1950
Matthew Fernandez [Sat, 14 Jan 2023 23:38:40 +0000 (15:38 -0800)]
ccomps getName: remove long lived allocation
This code is not on a hot path, so we can afford to use clearer scoping and
ownership semantics.
Gitlab: #1950
Matthew Fernandez [Sat, 14 Jan 2023 23:42:55 +0000 (15:42 -0800)]
ccomps gwrite: fix crash when failing to open files
This code looks as if it and the similar code in bcomps.c were copy-pasted from
the same common source. Except the bcomps.c version remembered to exit when
failing to open the output file, whereas the ccomps.c code would go on to crash
when using the null `outf`.
Matthew Fernandez [Sat, 14 Jan 2023 23:38:40 +0000 (15:38 -0800)]
bcomps getName: remove long lived allocation
This code is not on a hot path, so we can afford to use clearer scoping and
ownership semantics.
Gitlab: #1950
Matthew Fernandez [Sat, 14 Jan 2023 23:32:18 +0000 (15:32 -0800)]
bcomps init: squash -Wswitch-default warning
The default case is unreachable due to the preceding `getopt` call.
Matthew Fernandez [Sat, 14 Jan 2023 23:30:32 +0000 (15:30 -0800)]
bcomps split: use a more appropriate type for 'size'
Squashes 2 -Wconversion warnings.
Matthew Fernandez [Sat, 14 Jan 2023 23:27:43 +0000 (15:27 -0800)]
bcomps blockName: remove long lived allocation
It looks like a mistake in the initial revision of Graphviz that this function
never wrote to `bufsz`. The effect of this was that this function would
reallocate on every single call. So empirically it seems there was no need to
avoid allocating new memory on each call, which is what this commit does.
Gitlab: #1950
Matthew Fernandez [Sat, 14 Jan 2023 23:20:22 +0000 (15:20 -0800)]
smyrna smyrnaPath: replace 'sprintf' calls with 'snprintf'
Gitlab: #1950
Matthew Fernandez [Sun, 15 Jan 2023 17:49:00 +0000 (17:49 +0000)]
Merge branch 'smattr/
1b897ee0 -27b1-49d6-9891-
9f9a72c96a15 ' into 'main'
smyrna, glcomp, tclpkg compiler warning squashing
See merge request graphviz/graphviz!3048
Matthew Fernandez [Sat, 14 Jan 2023 05:39:59 +0000 (21:39 -0800)]
glcomp: remove 'type' that is always set to 'pangotext'
Matthew Fernandez [Sat, 14 Jan 2023 05:31:47 +0000 (21:31 -0800)]
glcomp: remove 'borderType' that is always set to 'glBorderSolid'
Matthew Fernandez [Sat, 14 Jan 2023 05:26:25 +0000 (21:26 -0800)]
smyrna DrawEllipse: use doubles for local temporaries
Values being stored into these were doubles and later use of these promoted them
to double. So it is not clear why they were not double to begin with. Squashes 2
-Wfloat-conversion warnings.
Matthew Fernandez [Sat, 14 Jan 2023 05:22:26 +0000 (21:22 -0800)]
smyrna drawCircle: abbreviate a float literal
Matthew Fernandez [Sat, 14 Jan 2023 05:22:16 +0000 (21:22 -0800)]
smyrna: abbreviate some accumulations
Matthew Fernandez [Sat, 14 Jan 2023 05:21:09 +0000 (21:21 -0800)]
smyrna: use a double for 'global_z'
Most of the calculations with this and uses of it are with doubles. So making it
a double as well avoids losing intermediate precision. Squashes 5
-Wfloat-conversion warnings.
Matthew Fernandez [Sat, 14 Jan 2023 04:58:18 +0000 (20:58 -0800)]
smyrna: remove some unhelpful comments
Matthew Fernandez [Sat, 14 Jan 2023 04:57:00 +0000 (20:57 -0800)]
smyrna glcreate_gl_topview_menu: squash -Wfloat-conversion warning
Matthew Fernandez [Sat, 14 Jan 2023 04:41:25 +0000 (20:41 -0800)]
tclpkg insert_poly: remove shadowing of 'polyid'
Matthew Fernandez [Sat, 14 Jan 2023 04:40:49 +0000 (20:40 -0800)]
tclpkg remove_poly: remove shadowing of 'polyid'
Matthew Fernandez [Sat, 14 Jan 2023 04:39:11 +0000 (20:39 -0800)]
tclpkg Plegal_arrangement: remove shadowing of 'i'
Matthew Fernandez [Sun, 15 Jan 2023 16:58:53 +0000 (16:58 +0000)]
Merge branch 'smattr/gitlab-2340' into 'main'
Autotools: fix non-portable syntax in configure.ac
Closes #2340
See merge request graphviz/graphviz!3049
Matthew Fernandez [Sat, 14 Jan 2023 18:45:15 +0000 (18:45 +0000)]
Merge branch 'smattr/gitlab-1950' into 'main'
migrate some 'sprintf' to agxbufs
See merge request graphviz/graphviz!3036
Matthew Fernandez [Mon, 2 Jan 2023 03:17:01 +0000 (19:17 -0800)]
pack: remove some unhelpful comments
Matthew Fernandez [Mon, 2 Jan 2023 02:47:13 +0000 (18:47 -0800)]
pack: use an agxbuf to simplify some code
Gitlab: #1950
Matthew Fernandez [Mon, 2 Jan 2023 02:47:13 +0000 (18:47 -0800)]
core plugin mp_bezier: use an agxbuf to simplify some code
Gitlab: #1950
Matthew Fernandez [Mon, 2 Jan 2023 02:47:13 +0000 (18:47 -0800)]
core plugin fig_bezier: use an agxbuf to simplify some code
Gitlab: #1950
Matthew Fernandez [Mon, 2 Jan 2023 02:39:27 +0000 (18:39 -0800)]
sfdpgen spring_electrical_spring_embedding: use an agxbuf instead of 'sprintf'
This leads to less manual memory management and fewer problems to think about.
Gitlab: #1950
Matthew Fernandez [Mon, 2 Jan 2023 02:39:27 +0000 (18:39 -0800)]
sfdpgen spring_maxent_embedding: use an agxbuf instead of 'sprintf'
This leads to less manual memory management and fewer problems to think about.
Gitlab: #1950
Matthew Fernandez [Mon, 2 Jan 2023 02:39:27 +0000 (18:39 -0800)]
sfdpgen spring_electrical_embedding: use an agxbuf instead of 'sprintf'
This leads to less manual memory management and fewer problems to think about.
Gitlab: #1950
Matthew Fernandez [Mon, 2 Jan 2023 02:39:27 +0000 (18:39 -0800)]
sfdpgen spring_electrical_embedding_slow: use an agxbuf instead of 'sprintf'
This leads to less manual memory management and fewer problems to think about.
Gitlab: #1950
Matthew Fernandez [Sat, 14 Jan 2023 17:54:55 +0000 (17:54 +0000)]
Merge branch 'smattr/
19e55e10 -d4ef-4070-aefe-
5dfc4817aa48 ' into 'main'
squash compiler warnings in release mode
See merge request graphviz/graphviz!3047
Matthew Fernandez [Sat, 14 Jan 2023 17:18:47 +0000 (09:18 -0800)]
add a CHANGELOG entry for the prior change
Gitlab: fixes #2340
Matthew Fernandez [Tue, 10 Jan 2023 16:09:33 +0000 (08:09 -0800)]
gvmap plot_dot_polygons: squash -Wunused-variable warning in release mode
Matthew Fernandez [Tue, 10 Jan 2023 16:04:47 +0000 (08:04 -0800)]
core plugin core_loadimage_vrml: squash warning in release mode
This triggered -Wunused-variable warnings.
Matthew Fernandez [Tue, 10 Jan 2023 16:02:31 +0000 (08:02 -0800)]
sparse SparseMatrix_distance_matrix: squash warning in release mode
This code triggered a -Wunused-variable warning.
Matthew Fernandez [Tue, 10 Jan 2023 16:01:53 +0000 (08:01 -0800)]
sparse get_mq: squash -Wunused-variable warning in release mode
Matthew Fernandez [Tue, 10 Jan 2023 16:00:59 +0000 (08:00 -0800)]
sparse BinaryHeap_sanity_check: squash warnings in release mode
This code triggered -Wunused-variable warnings.
Matthew Fernandez [Tue, 10 Jan 2023 16:00:40 +0000 (08:00 -0800)]
sparse BinaryHeap_insert: squash -Wunused-variable warning in release mode
Matthew Fernandez [Tue, 10 Jan 2023 15:58:24 +0000 (07:58 -0800)]
mindle agglomerative_ink_bundling_internal: squash warning in release mode
When building in release mode, this causes a -Wunused-variable warning.
Matthew Fernandez [Tue, 10 Jan 2023 15:57:43 +0000 (07:57 -0800)]
cgraph: remove advice about '[[maybe_unused]]'
This attribute was only introduced in C++17 and we currently build with C++11.
Matthew Fernandez [Tue, 10 Jan 2023 15:55:16 +0000 (07:55 -0800)]
dotgen dot_position: squash -Wunused-variable warning in release mode
Matthew Fernandez [Tue, 10 Jan 2023 15:54:21 +0000 (07:54 -0800)]
dotgen find_fast_node: squash -Wunused-function warning in release mode
Matthew Fernandez [Tue, 10 Jan 2023 15:51:59 +0000 (07:51 -0800)]
label xlhdxunload: squash -Wunused-variable warning in release mode
Matthew Fernandez [Sat, 14 Jan 2023 17:03:49 +0000 (17:03 +0000)]
Merge branch 'libtgs_cmake' into 'main'
CMake: Add support for GNU Triangulated Surface Library
See merge request graphviz/graphviz!3046
Michael Bäuerle [Thu, 12 Jan 2023 11:25:00 +0000 (03:25 -0800)]
Autotools: fix non-portable syntax in configure.ac