]>
granicus.if.org Git - graphviz/log
Matthew Fernandez [Sun, 18 Apr 2021 00:35:33 +0000 (17:35 -0700)]
gdiplus plugin: remove the use of C-style casts to convert void pointers
In C++, C-style casts are a heavy hammer that is generally too powerful for your
needs. It effectively says to the compiler, “shut up, I know what I’m doing” and
impedes its ability to give you useful diagnostics. By using less powerful
reinterpret_casts, we preserve the compiler’s ability to warn about, e.g.,
implicitly converting a const pointer to non-const.
Matthew Fernandez [Sun, 18 Apr 2021 00:33:09 +0000 (17:33 -0700)]
gdiplus plugin: remove some unnecessary casts
Typed pointers implicitly coerce to void* in C++.
Matthew Fernandez [Sun, 18 Apr 2021 00:11:33 +0000 (17:11 -0700)]
gdiplus plugin: remove manual memory management of font pointers
Matthew Fernandez [Sat, 24 Apr 2021 02:15:28 +0000 (02:15 +0000)]
Merge branch 'smattr/
74956806 -d2f0-4864-b125-
77374faa7de5 ' into 'main'
more clean up and modernization in lib/ortho
See merge request graphviz/graphviz!1905
Matthew Fernandez [Sat, 17 Apr 2021 23:41:19 +0000 (16:41 -0700)]
use a stronger return type for is_parallel
Matthew Fernandez [Sat, 17 Apr 2021 23:39:02 +0000 (16:39 -0700)]
use a stronger return type for rectIntersect
Matthew Fernandez [Sat, 17 Apr 2021 23:37:32 +0000 (16:37 -0700)]
remove unused return type from get_vertex_positions
Matthew Fernandez [Sat, 17 Apr 2021 23:36:38 +0000 (16:36 -0700)]
use a stronger return type for inside_polygon
Matthew Fernandez [Sat, 17 Apr 2021 23:36:12 +0000 (16:36 -0700)]
use C99 bools in _greater_than
Matthew Fernandez [Sat, 17 Apr 2021 23:33:04 +0000 (16:33 -0700)]
use a stronger return type for edge_exists
Matthew Fernandez [Sat, 17 Apr 2021 23:29:57 +0000 (16:29 -0700)]
use a C99 bool for segment_t.is_inserted
Now that we compile with C99, there is no need to use an ambiguous type like int
or the hand rolled boolean values for something like this.
Matthew Fernandez [Sat, 17 Apr 2021 23:22:26 +0000 (16:22 -0700)]
use a C99 bool return type for init_query_structure
Now that we compile with C99, there's no need to use the internal boolean type
for things like this.
Matthew Fernandez [Sat, 17 Apr 2021 23:21:18 +0000 (16:21 -0700)]
use stronger types for comparators in lib/ortho/trapezoid.c
This leads to more readable and obvious code.
Matthew Fernandez [Sat, 17 Apr 2021 23:20:19 +0000 (16:20 -0700)]
remove unused return value from _min
Matthew Fernandez [Sat, 17 Apr 2021 23:19:52 +0000 (16:19 -0700)]
remove unused return value from _max
Matthew Fernandez [Sat, 17 Apr 2021 23:19:08 +0000 (16:19 -0700)]
remove some commented out code
Matthew Fernandez [Sat, 17 Apr 2021 23:18:50 +0000 (16:18 -0700)]
replace header guards in lib/ortho with more modern #pragma once
Matthew Fernandez [Sat, 17 Apr 2021 23:12:44 +0000 (16:12 -0700)]
reflow some code in lib/ortho
Matthew Fernandez [Sat, 17 Apr 2021 23:06:27 +0000 (16:06 -0700)]
remove some unnecessary bracketing in lib/ortho
Matthew Fernandez [Sat, 17 Apr 2021 22:40:17 +0000 (15:40 -0700)]
replace some open coded max/min with fmax/fmin
Matthew Fernandez [Sat, 17 Apr 2021 22:15:40 +0000 (15:15 -0700)]
remove redundant __USE_ISOC99
The build system sets -std=c99 these days, which already achieves this.
Magnus Jacobsson [Thu, 22 Apr 2021 16:07:31 +0000 (16:07 +0000)]
Merge branch 'add-ubuntu20-10-cmake-ASan-build-job-to-ci' into 'main'
Add Ubuntu 20.10 CMake ASan build and test jobs to CI
Closes #1881
See merge request graphviz/graphviz!1899
Magnus Jacobsson [Mon, 12 Apr 2021 07:59:25 +0000 (09:59 +0200)]
Add ubuntu20-10-cmake-ASan-test job to CI
Magnus Jacobsson [Mon, 12 Apr 2021 05:23:05 +0000 (07:23 +0200)]
Add ubuntu20-10-cmake-ASan-build job to CI
Magnus Jacobsson [Sat, 3 Apr 2021 21:12:12 +0000 (23:12 +0200)]
Add use_santizers option to CMake build
Matthew Fernandez [Wed, 25 Nov 2020 02:05:45 +0000 (18:05 -0800)]
ensure ID_LIKE is always set on Debian in CI
When running on the native Linux host in Gitlab CI instead of within a Docker
container, ID_LIKE is not set in /etc/os-release. So we set it based on ID if
that is available. Related to #1881.
Matthew Fernandez [Tue, 20 Apr 2021 16:00:10 +0000 (16:00 +0000)]
Merge branch 'smattr/
409a27e8 -3d56-43a8-96aa-
8763cae871c5 ' into 'main'
clean up and warning squashing in plugin/core
See merge request graphviz/graphviz!1902
Matthew Fernandez [Wed, 14 Apr 2021 04:27:21 +0000 (21:27 -0700)]
remove 3 -Wunused-parameter warnings
Matthew Fernandez [Wed, 14 Apr 2021 04:23:25 +0000 (21:23 -0700)]
squash a -Wsign-converion warning
Matthew Fernandez [Wed, 14 Apr 2021 04:22:03 +0000 (21:22 -0700)]
remove vasprintf alternative in pov rendering
When we need to maintain a fallback option anyway, having a vasprintf
implementation does not gain us much. Moreover, nothing in the build system was
checking for the existence of vasprintf, so this code was never being used
anyway.
Matthew Fernandez [Wed, 14 Apr 2021 04:18:57 +0000 (21:18 -0700)]
fix reuse of va_list in pov rendering
While this often works out on certain architectures, it is technically not
allowed to use a va_list twice. This change fixes the el function for platforms
where reusing va_lists is not possible.
Matthew Fernandez [Wed, 14 Apr 2021 04:15:18 +0000 (21:15 -0700)]
remove short buffer path in pov rendering el
C99 vsnprintf semantics let you call the function with a NULL pointer to
discover the required number of bytes to print the given string. With this
ability, there is no longer any advantage to having two paths through this
function.
Matthew Fernandez [Wed, 14 Apr 2021 04:08:22 +0000 (21:08 -0700)]
remove unused variable assignment
Matthew Fernandez [Wed, 14 Apr 2021 04:06:57 +0000 (21:06 -0700)]
mark pov rendering function el as static
This function is not used outside this file. Squashes a -Wmissing-prototype
warning.
Matthew Fernandez [Wed, 14 Apr 2021 04:05:39 +0000 (21:05 -0700)]
squash 2 -Wunused-parameter warnings
Matthew Fernandez [Wed, 14 Apr 2021 04:04:58 +0000 (21:04 -0700)]
squash a -Wunused-parameter warning
Matthew Fernandez [Wed, 14 Apr 2021 04:04:12 +0000 (21:04 -0700)]
squash a -Wconversion warning
Matthew Fernandez [Wed, 14 Apr 2021 04:00:22 +0000 (21:00 -0700)]
squash 2 -Wsign-conversion warnings
Matthew Fernandez [Wed, 14 Apr 2021 03:55:12 +0000 (20:55 -0700)]
mark html_string in vml rendering as static
This is not used outside this file. Squashes a -Wmissing-prototype warning.
Matthew Fernandez [Wed, 14 Apr 2021 03:54:22 +0000 (20:54 -0700)]
squash a -Wunused-parameter warning
Matthew Fernandez [Wed, 14 Apr 2021 03:53:11 +0000 (20:53 -0700)]
squash 3 -Wunused-parameter warnings
Matthew Fernandez [Wed, 14 Apr 2021 03:51:49 +0000 (20:51 -0700)]
squash 2 -Wunused-parameter warnings
Matthew Fernandez [Wed, 14 Apr 2021 03:49:57 +0000 (20:49 -0700)]
squash 2 -Wunused-parameter warnings
Matthew Fernandez [Wed, 14 Apr 2021 03:49:22 +0000 (20:49 -0700)]
squash some -Wundef warnings
Matthew Fernandez [Wed, 14 Apr 2021 03:48:15 +0000 (20:48 -0700)]
squash 2 -Wunused-parameter warnings
Matthew Fernandez [Wed, 14 Apr 2021 03:47:09 +0000 (20:47 -0700)]
squash 3 -Wunused-parameter warnings
Matthew Fernandez [Wed, 14 Apr 2021 03:46:39 +0000 (20:46 -0700)]
squash a -Wunused-parameter warning
Matthew Fernandez [Wed, 14 Apr 2021 03:45:42 +0000 (20:45 -0700)]
squash 2 -Wunused-parameter warnings
Matthew Fernandez [Wed, 14 Apr 2021 03:45:01 +0000 (20:45 -0700)]
squash 3 -Wconversion warnings
Matthew Fernandez [Wed, 14 Apr 2021 03:44:00 +0000 (20:44 -0700)]
squash a -Wsign-conversion warning
Matthew Fernandez [Wed, 14 Apr 2021 03:43:11 +0000 (20:43 -0700)]
squash some -Wsign-conversion warnings
Matthew Fernandez [Wed, 14 Apr 2021 03:40:20 +0000 (20:40 -0700)]
squash 2 -Wunused-parameter warnings
Matthew Fernandez [Wed, 14 Apr 2021 03:37:29 +0000 (20:37 -0700)]
squash 3 -Wconversion warnings
Matthew Fernandez [Wed, 14 Apr 2021 03:28:04 +0000 (20:28 -0700)]
squash a -Wsign-conversion warning
Matthew Fernandez [Wed, 14 Apr 2021 03:25:58 +0000 (20:25 -0700)]
squash a -Wsign-conversion warning
Matthew Fernandez [Wed, 14 Apr 2021 03:24:17 +0000 (20:24 -0700)]
use a stronger type to toplevel parameter of set_attrwf for consistency
Matthew Fernandez [Wed, 14 Apr 2021 03:23:37 +0000 (20:23 -0700)]
use a stronger type to squash 3 -Wconversion warnings in set_attrwf
Matthew Fernandez [Wed, 14 Apr 2021 03:15:52 +0000 (20:15 -0700)]
remove the need to cast xdot_str parameters
Squashes a -Wcast-qual warning.
Matthew Fernandez [Wed, 14 Apr 2021 03:15:40 +0000 (20:15 -0700)]
squash some -Wunused-parameter warnings
Matthew Fernandez [Wed, 14 Apr 2021 03:08:51 +0000 (20:08 -0700)]
squash a -Wsign-conversion warning
Matthew Fernandez [Wed, 14 Apr 2021 03:06:35 +0000 (20:06 -0700)]
squash a -Wconversion warning in xdot_begin_graph
Unclear why this variable was an int when it was even named as if it was an
unsigned short.
Matthew Fernandez [Wed, 14 Apr 2021 03:04:36 +0000 (20:04 -0700)]
rewrite versionStr2Version to use strtoul
The atoi function has no ability to report failure. There is no advantage to
using it over the safer strto* functions. This change also removes a
-Wconversion warning.
Matthew Fernandez [Wed, 14 Apr 2021 02:50:26 +0000 (19:50 -0700)]
remove shadowing of xbuf global
Matthew Fernandez [Wed, 14 Apr 2021 02:35:52 +0000 (19:35 -0700)]
remove commented out code
Matthew Fernandez [Wed, 14 Apr 2021 02:27:50 +0000 (19:27 -0700)]
remove unused PIC_COORDS_PER_LINE
Matthew Fernandez [Mon, 19 Apr 2021 04:33:47 +0000 (04:33 +0000)]
Merge branch 'smattr/
f7e0325f -8ecb-48b3-8e51-
bb05a383d72d ' into 'main'
more clean up of manual memory management in visio plugin
See merge request graphviz/graphviz!1900
Matthew Fernandez [Tue, 13 Apr 2021 02:19:30 +0000 (19:19 -0700)]
remove CreateHyperlink
This function was adding no value over just calling the Hyperlink constructor
directly.
Matthew Fernandez [Tue, 13 Apr 2021 02:11:10 +0000 (19:11 -0700)]
manage Hyperlinks by value instead of pointer in the visio plugin
There is no inheritance involved here, so there was no advantage to manually
managing memory for Hyperlinks or passing them around by pointer.
Matthew Fernandez [Tue, 13 Apr 2021 01:57:36 +0000 (18:57 -0700)]
fix: use managed memory for Hyperlink’s string pointers
Similar to the prior fix to Run, this removes a latent safety issue with the
management of these pointers.
Matthew Fernandez [Tue, 13 Apr 2021 01:48:32 +0000 (18:48 -0700)]
manage _run member of Text as a value instead of a pointer
This member is never set to NULL and the Run class is not involved in any
inheritance hierarchy. So there is no need to heap-allocate it or pass it around
by pointer.
Matthew Fernandez [Tue, 13 Apr 2021 01:40:25 +0000 (18:40 -0700)]
fix: use managed memory for Run’s _text member
This removes the need to manually manage memory for this member but, more
importantly makes this class copy-safe. The implicit copy constructor of this
class would copy the pointer in the _text member. When either the original
object or the new copy was deleted, the pointer would be freed leaving its
duplicate in the other copy dangling. Any attempt to access this would result in
use-after-free and deleting the object would cause a double-free.
Following this change, it is safe to copy a Run object. This issue was latent,
because no existing code causes a Run object to be copied.
Matthew Fernandez [Sun, 18 Apr 2021 20:19:23 +0000 (20:19 +0000)]
Merge branch 'smattr/
ad4aa51f -c3fd-4ba1-97a5-
61d0fba501eb ' into 'main'
some warning clean up in cmd/smyrna
See merge request graphviz/graphviz!1898
Matthew Fernandez [Mon, 12 Apr 2021 04:40:39 +0000 (21:40 -0700)]
squash -Wmissing-prototypes warning
Matthew Fernandez [Mon, 12 Apr 2021 04:32:18 +0000 (21:32 -0700)]
remove unused parameter from glmotion_zoom
Matthew Fernandez [Mon, 12 Apr 2021 04:26:17 +0000 (21:26 -0700)]
remove unused inc_value variable in glmotion_zoom_inc
Matthew Fernandez [Mon, 12 Apr 2021 04:24:28 +0000 (21:24 -0700)]
remove unused Status variable
This was only used by LoadGLTextures that was recently removed.
Matthew Fernandez [Mon, 12 Apr 2021 04:24:02 +0000 (21:24 -0700)]
squash a -Wfloat-conversion warning
Matthew Fernandez [Mon, 12 Apr 2021 04:10:56 +0000 (21:10 -0700)]
remove unused LoadGLTextures
Matthew Fernandez [Mon, 12 Apr 2021 04:08:16 +0000 (21:08 -0700)]
squash -Wunused-parameter in EmbedText
Matthew Fernandez [Mon, 12 Apr 2021 04:07:17 +0000 (21:07 -0700)]
squash -Wunused-parameter warning in InsertImage
Matthew Fernandez [Mon, 12 Apr 2021 04:06:27 +0000 (21:06 -0700)]
squash -Wunused-parameter warning in SetFont
Matthew Fernandez [Mon, 12 Apr 2021 04:05:49 +0000 (21:05 -0700)]
squash -Wunused-parameter warnings in SetStyle
Matthew Fernandez [Mon, 12 Apr 2021 04:05:22 +0000 (21:05 -0700)]
squash -Wunused-parameter in SetPenColor
Matthew Fernandez [Mon, 12 Apr 2021 04:04:49 +0000 (21:04 -0700)]
squash -Wunused-parameter warning in SetFillColor
Matthew Fernandez [Mon, 12 Apr 2021 04:03:01 +0000 (21:03 -0700)]
fix -Wpointer-compare warning
Matthew Fernandez [Mon, 12 Apr 2021 04:01:36 +0000 (21:01 -0700)]
remove unused filled variable from DrawPolygon
Matthew Fernandez [Mon, 12 Apr 2021 03:57:38 +0000 (20:57 -0700)]
remove unused parameter from set_options
Matthew Fernandez [Mon, 12 Apr 2021 03:55:56 +0000 (20:55 -0700)]
squash a -Wstrict-prototypes warning
Matthew Fernandez [Mon, 12 Apr 2021 03:54:53 +0000 (20:54 -0700)]
remove unused parameter from arcmouseDrag
Matthew Fernandez [Mon, 12 Apr 2021 03:49:40 +0000 (20:49 -0700)]
remove unused parameter from arcmouseClick
Matthew Fernandez [Mon, 12 Apr 2021 03:13:04 +0000 (20:13 -0700)]
remove unused code
Matthew Fernandez [Sun, 18 Apr 2021 05:02:48 +0000 (05:02 +0000)]
Merge branch 'smattr/
5EDB9D68 -064A-4027-AFC3-
A46101BAF4E5 ' into 'main'
in Windows CI tasks, install Python 3 from Chocolatey
See merge request graphviz/graphviz!1896
Matthew Fernandez [Sun, 11 Apr 2021 03:30:28 +0000 (20:30 -0700)]
remove Python 3.8 fallback in Windows CI tasks
As of the previous commit, Python >3.8 is installed prior to running this
script, so no fallback should be required. Python 3.8 can be removed from the
Windows build utilities repository.¹
¹ https://gitlab.com/graphviz/graphviz-build-utilities
Matthew Fernandez [Sun, 11 Apr 2021 03:01:28 +0000 (20:01 -0700)]
install Python 3 as a pre-requisite in Windows CI tasks
Prior to this change, Python 3.8 was used on Windows in CI via the Windows
build dependencies repository.¹ This works but has a number of shortcomings:
1. Upgrading the version of Python used in CI requires access to a Windows
machine; and
2. Upgrading the version of Python used in CI requires building CPython from
source; and
3. Python-dependent failures are hard to root cause because they may be an
issue with how we built CPython.²
As of this commit, Python 3 is installed via the Chocolatey³ package manager.
At time of writing, this installs Python 3.9.4. This is not pinned to a specific
version – i.e. a new Chocolatey package of Python 3 will result in Graphviz
immediately using that in CI. I believe this is actually the behavior we want
right now; pro-actively catching any issues caused by Python upgrades.
This does not change the baseline requirement for Graphviz CI/test scripts from
Python 3.6. Scripts should still be written to be backwards compatible to 3.6.
As this change introduces a new non-trivial step in the Windows CI tasks,
execution time is relevant. At time of writing, the macOS jobs dominate Graphviz
CI execution time, both before and after this change. Thus I think this is
acceptable.
¹ https://gitlab.com/graphviz/graphviz-build-utilities
² E.g. #2000, “CI Python OSErrors from Windows tasks”
³ https://chocolatey.org/
Matthew Fernandez [Sun, 18 Apr 2021 03:36:06 +0000 (03:36 +0000)]
Merge branch 'smattr/
d3552219 -a755-4a56-9a55-
2eebb5819810 ' into 'main'
more vpsc clean up
See merge request graphviz/graphviz!1895
Matthew Fernandez [Sun, 11 Apr 2021 02:45:46 +0000 (19:45 -0700)]
push a variable closer its use in generateYConstraints
Matthew Fernandez [Sun, 11 Apr 2021 02:45:29 +0000 (19:45 -0700)]
push a variable closer to its use in generateXConstraints
Matthew Fernandez [Sun, 11 Apr 2021 02:43:58 +0000 (19:43 -0700)]
use range-based for loops to clean up some iteration
Matthew Fernandez [Sun, 11 Apr 2021 02:32:44 +0000 (19:32 -0700)]
cut variable dependency and push closer to its use in generateYConstraints
Matthew Fernandez [Sun, 11 Apr 2021 02:32:11 +0000 (19:32 -0700)]
cut variable dependency and push closer to its use in generateXConstraints