]>
granicus.if.org Git - graphviz/log
Matthew Fernandez [Sat, 1 May 2021 05:36:43 +0000 (05:36 +0000)]
Merge branch 'independence-inn' into 'main'
build: use CMake to drive the position independence
See merge request graphviz/graphviz!1923
Saleem Abdulrasool [Sun, 25 Apr 2021 00:50:08 +0000 (17:50 -0700)]
build: use CMake to drive the position independence
This replaces the use of `-fPIC` with `CMAKE_POSITION_INDEPENDENT_CODE`
which is used by CMake to initialise the `POSITION_INDEPENDENT_CODE`
property on targets, which allows the portable way to indicate the
compiler-independent spelling for `-fPIC`. This was previously unset on
MSVC because MSVC does not support the `-fPIC` option and Windows by
default is PIC by means of the base relocation of the binary.
Matthew Fernandez [Sat, 1 May 2021 01:17:15 +0000 (01:17 +0000)]
Merge branch 'smattr/
8AC007D7 -AEDE-49D4-800C-
266AB9198BDD ' into 'main'
squash some Pylint warnings
See merge request graphviz/graphviz!1919
Matthew Fernandez [Sat, 24 Apr 2021 17:30:08 +0000 (10:30 -0700)]
remove an unused variable
Matthew Fernandez [Sat, 24 Apr 2021 17:27:59 +0000 (10:27 -0700)]
remove unused parameter to judge()
Matthew Fernandez [Sat, 24 Apr 2021 17:26:24 +0000 (10:26 -0700)]
disable Pylint too-few-public-methods
What kind of a warning is this? A class with even a single method isn’t a
mistake. It’s likely abstraction or indicating something semantic to the reader.
Matthew Fernandez [Sat, 24 Apr 2021 17:25:18 +0000 (10:25 -0700)]
remove an unnecessary Python class
Matthew Fernandez [Sat, 24 Apr 2021 17:24:31 +0000 (10:24 -0700)]
suppress an import-position Pylint warning
Matthew Fernandez [Sat, 24 Apr 2021 17:23:56 +0000 (10:23 -0700)]
squash multiple-imports Pyint warning
Matthew Fernandez [Sat, 24 Apr 2021 17:22:56 +0000 (10:22 -0700)]
remove an unnecessary class in a Python file
Matthew Fernandez [Sat, 24 Apr 2021 17:21:51 +0000 (10:21 -0700)]
replace tabs in one Python file
Matthew Fernandez [Sat, 24 Apr 2021 17:21:07 +0000 (10:21 -0700)]
squash no-else-after-return Pylint warnings
Matthew Fernandez [Sat, 24 Apr 2021 17:18:12 +0000 (10:18 -0700)]
disable Pylint too-many-branches and too-many-statements
Pylint’s definition of “too many” is quite low, especially for the kind of glue
code we use Python for.
Matthew Fernandez [Sat, 24 Apr 2021 17:17:31 +0000 (10:17 -0700)]
squash Pylint warnings for multiple statements on a line
Matthew Fernandez [Sat, 24 Apr 2021 17:15:51 +0000 (10:15 -0700)]
disable Pylint redefined-builtin warning
We do not care about redefining things like `input`.
Matthew Fernandez [Sat, 24 Apr 2021 17:14:42 +0000 (10:14 -0700)]
squash wrong-import-order Pylint warnings for run_c
Matthew Fernandez [Sat, 24 Apr 2021 17:12:38 +0000 (10:12 -0700)]
fix a numbe of Pylint import-order warnings
Matthew Fernandez [Sat, 24 Apr 2021 17:05:43 +0000 (10:05 -0700)]
remove a Python == comparison against None
Matthew Fernandez [Sat, 24 Apr 2021 17:04:08 +0000 (10:04 -0700)]
replace exit() with sys.exit() in Python files
Matthew Fernandez [Sat, 24 Apr 2021 17:01:34 +0000 (10:01 -0700)]
remove unnecessary semi-colons in Python files
Matthew Fernandez [Sat, 24 Apr 2021 16:59:02 +0000 (09:59 -0700)]
fix some Pylint lines-too-long warnings
Matthew Fernandez [Sat, 24 Apr 2021 16:52:56 +0000 (09:52 -0700)]
remove unused imports in Python files
Matthew Fernandez [Sat, 24 Apr 2021 16:49:41 +0000 (09:49 -0700)]
remove trailing newlines from Python files
Matthew Fernandez [Sat, 24 Apr 2021 16:48:20 +0000 (09:48 -0700)]
remove trailing whitespace in Python files
Matthew Fernandez [Thu, 29 Apr 2021 15:45:06 +0000 (15:45 +0000)]
Merge branch 'smattr/
AD0827FA -EDD0-4329-BA29-
B4A977515179 ' into 'main'
add sprintf-like helper
See merge request graphviz/graphviz!1916
Matthew Fernandez [Fri, 23 Apr 2021 01:48:41 +0000 (18:48 -0700)]
replace a use of snprintf pattern with gv_sprint
This commit serves as an example of how to use the functionality added in the
previous commit. Related to #1950.
Matthew Fernandez [Fri, 23 Apr 2021 01:29:21 +0000 (18:29 -0700)]
add sprintf-like helper
The function sprintf is generally considered unsafe to use in modern C. In the
Graphviz code base, its uses are slowly being replaced with safer alternatives
(#1950). However, the alternative code is frequently overly verbose and
counter-intuitive. This commit adds (hopefully) convenient alternative functions
that can be used to replace sprintf uses. The gv_sprint function is similar to
the GNU asprintf function with a different calling convention.
The tests added alongside follow the same strategy as used for testing
lib/vmalloc.
Matthew Fernandez [Wed, 28 Apr 2021 15:51:38 +0000 (15:51 +0000)]
Merge branch 'smattr/
E31C3F18 -8D47-4280-873E-
857FC13A19AB ' into 'main'
clean up and warning squashing in tclpkg/
See merge request graphviz/graphviz!1915
Matthew Fernandez [Thu, 22 Apr 2021 02:53:46 +0000 (19:53 -0700)]
remove unnecessary bracketing and space in tclhandle.c
Matthew Fernandez [Thu, 22 Apr 2021 02:50:36 +0000 (19:50 -0700)]
remove unused ISSPACE
Matthew Fernandez [Thu, 22 Apr 2021 02:48:13 +0000 (19:48 -0700)]
compute tclhandleEntryAlignment at compile time
There is no need to defer this to runtime. Making this a compile-time constant
allows the compiler to constant-fold computations involving it, producing more
efficient code.
Note, this is not really even the correct notion of platform alignment. The
alignment of a type is not guaranteed to be the same as its size. Nevertheless,
we leave this alone for now.
Matthew Fernandez [Thu, 22 Apr 2021 02:10:31 +0000 (19:10 -0700)]
remove useless cast
Matthew Fernandez [Thu, 22 Apr 2021 02:10:19 +0000 (19:10 -0700)]
fix: consistently treat entry indices as uint64_t in tclhandle
This code intermingled uint64_t and int values for representing indices into an
array. Making this consistent removes a huge number of -Wsign-conversion and
-Wsign-compare compiler warnings, as well as more serious problem where printing
code assumed "%lu" was the format code to print an index. This is not true when
uint64_t is not the same type as unsigned long and would have most probably
resulted in stack corruption.
Matthew Fernandez [Wed, 28 Apr 2021 04:46:50 +0000 (04:46 +0000)]
Merge branch 'smattr/
b3c0b645 -f677-4b03-b68f-
18e05373d6ef ' into 'main'
more clean up and warning squashing in plugin/core
See merge request graphviz/graphviz!1914
Matthew Fernandez [Wed, 21 Apr 2021 01:54:30 +0000 (18:54 -0700)]
squash -Wunused-parameter warning in pic_polygon
Matthew Fernandez [Wed, 21 Apr 2021 01:53:32 +0000 (18:53 -0700)]
squash -Wunused-parameter warnings in pic_bezier
Matthew Fernandez [Wed, 21 Apr 2021 01:48:06 +0000 (18:48 -0700)]
squash two -Wsign-compare warnings in pic_string
This is the equivalent of
4b33b8c3ad41e03f441959a58dc3e5d65ffc12bd and
337190b7b9b35c114f13043fa4541a210e61925a which we need to apply for a third time
because this function has been copied and pasted. Related to #2051.
Matthew Fernandez [Wed, 21 Apr 2021 01:38:10 +0000 (18:38 -0700)]
squash -Wsign-conversion warnings in pic_string
This is the equivalent of
5a5aa9c606db77f444d744a11de61eb75de2b6ea and
be2de1fec0e5279a54a16e66cd96cdb620029a30 which we need to apply for a third time
because this function has been copied and pasted. Related to #2051.
Matthew Fernandez [Wed, 21 Apr 2021 01:42:59 +0000 (18:42 -0700)]
remove an open coded fmax
Matthew Fernandez [Wed, 21 Apr 2021 01:30:48 +0000 (18:30 -0700)]
fold printing of some constants into the format string itself
There's no need to suffer the overhead of dynamically serializing these values
whose representation we know at compile time.
Matthew Fernandez [Wed, 21 Apr 2021 01:26:01 +0000 (18:26 -0700)]
do pov_begin_graph computation entirely on doubles
This code was triggering a number of -Wfloat-conversion compiler warnings, and
there is really no need to truncate values during computation. We can do the
entire thing on doubles with better accuracy, though the final result is
truncated to three decimal places.
Matthew Fernandez [Wed, 21 Apr 2021 01:22:57 +0000 (18:22 -0700)]
remove unnecessary calls to fabsf
Matthew Fernandez [Wed, 21 Apr 2021 01:16:05 +0000 (18:16 -0700)]
fix some casts to incorrect target type
Removes two -Wsign-conversion warnings.
Matthew Fernandez [Wed, 21 Apr 2021 01:14:37 +0000 (18:14 -0700)]
remove use of %d to emit unsigneds in VML plugin
Matthew Fernandez [Wed, 21 Apr 2021 01:11:33 +0000 (18:11 -0700)]
squash -Wunused-parameter in tkgen_begin_edge
Matthew Fernandez [Wed, 21 Apr 2021 01:11:09 +0000 (18:11 -0700)]
squash -Wunused-parameter warning in tkgen_begin_node
Matthew Fernandez [Wed, 21 Apr 2021 01:10:20 +0000 (18:10 -0700)]
squash 8 -Wconversion warnings
Matthew Fernandez [Wed, 21 Apr 2021 00:57:19 +0000 (17:57 -0700)]
remove unused parameters to svg_rgradstyle
Matthew Fernandez [Wed, 21 Apr 2021 00:56:10 +0000 (17:56 -0700)]
remove commented out code
Matthew Fernandez [Mon, 26 Apr 2021 15:30:06 +0000 (15:30 +0000)]
Merge branch 'smattr/
b06d6e22 -33f7-4371-ba03-
b58b72af0dce ' into 'main'
more modernization and removal of manual memory management in plugin/visio
See merge request graphviz/graphviz!1913
Matthew Fernandez [Tue, 20 Apr 2021 04:31:41 +0000 (21:31 -0700)]
replace use of NULL in the Visio plugin with more modern nullptr
Matthew Fernandez [Tue, 20 Apr 2021 04:28:51 +0000 (21:28 -0700)]
more precisely express inheritance relationship in Path classes
This gives the compiler a greater ability to understand the programmer’s
intentions and diagnose misuse of these classes.
Matthew Fernandez [Tue, 20 Apr 2021 04:17:56 +0000 (21:17 -0700)]
remove manual memory management of _points in Path class
Matthew Fernandez [Tue, 20 Apr 2021 03:37:02 +0000 (20:37 -0700)]
remove the use of %d to print unsigned integers in the Visio plugin
Matthew Fernandez [Tue, 20 Apr 2021 03:27:41 +0000 (20:27 -0700)]
remove Visual Studio options files
Quoting the Microsoft docs,¹ “This file should not be checked in to source
code control.”
¹ https://docs.microsoft.com/en-us/visualstudio/extensibility/internals/solution-user-options-dot-suo-file?view=vs-2019
Matthew Fernandez [Tue, 20 Apr 2021 03:26:32 +0000 (20:26 -0700)]
remove the use of C-style casts to convert void* to Visio::Render*
C-style casts are unnecessarily strong to use here. A reinterpret_cast gives the
compiler a better ability to warn about misuse.
Matthew Fernandez [Mon, 26 Apr 2021 02:50:39 +0000 (19:50 -0700)]
Merge 'jfriesne/jaf-fix-uninitialized-memory-read-in-call-try' into main
Matthew Fernandez [Mon, 26 Apr 2021 02:50:07 +0000 (19:50 -0700)]
add a changelog entry for prior commit
Jeremy Friesner [Tue, 20 Apr 2021 00:17:29 +0000 (17:17 -0700)]
Fix for uninitialized-memory-read in call_tri() that would occur after delaunay_tri() returned NULL and never set numberofedges to anything
Matthew Fernandez [Sun, 25 Apr 2021 20:58:40 +0000 (20:58 +0000)]
Merge branch 'smattr/
d0423bd6 -65fb-4d10-abf7-
905a337bab9e ' into 'main'
more warning squashing in cmd/smyrna
See merge request graphviz/graphviz!1910
Matthew Fernandez [Mon, 19 Apr 2021 00:53:59 +0000 (17:53 -0700)]
remove unused display function
Matthew Fernandez [Mon, 19 Apr 2021 00:52:45 +0000 (17:52 -0700)]
fix type of variable used for interacting with getopt
Fixes some -Wsign-conversion and -Wsign-compare warnings.
Matthew Fernandez [Mon, 19 Apr 2021 00:51:31 +0000 (17:51 -0700)]
remove unused modefile parameter to load_mouse_actions
Matthew Fernandez [Mon, 19 Apr 2021 00:50:12 +0000 (17:50 -0700)]
remove commented out code
Matthew Fernandez [Mon, 19 Apr 2021 00:48:34 +0000 (17:48 -0700)]
fix some incorrect function return type definitions
Squashes a number of -Wold-style-declaration warnings.
Matthew Fernandez [Mon, 19 Apr 2021 00:46:37 +0000 (17:46 -0700)]
squash -Wunused-parameter warnings in outfn
Matthew Fernandez [Mon, 19 Apr 2021 00:45:06 +0000 (17:45 -0700)]
squash -Wunused-parameter warnings in on_dlgOpenGraph_btnOK_clicked
Matthew Fernandez [Mon, 19 Apr 2021 00:44:36 +0000 (17:44 -0700)]
squash -Wunused-parameter warning in dlgOpenGraph_OK_Clicked
Matthew Fernandez [Mon, 19 Apr 2021 00:43:58 +0000 (17:43 -0700)]
squash -Wunused-parameter warnings in save_graph_clicked
Matthew Fernandez [Mon, 19 Apr 2021 00:39:54 +0000 (17:39 -0700)]
abbreviate an increment
Matthew Fernandez [Mon, 19 Apr 2021 00:39:37 +0000 (17:39 -0700)]
squash -Wunused-parameter warnings in on_consoleincbtn_clicked
Matthew Fernandez [Mon, 19 Apr 2021 00:39:11 +0000 (17:39 -0700)]
abbreviate a decrement
Matthew Fernandez [Mon, 19 Apr 2021 00:38:53 +0000 (17:38 -0700)]
squash -Wunused-parameter warnings in on_consoledecbtn_clicked
Matthew Fernandez [Mon, 19 Apr 2021 00:38:22 +0000 (17:38 -0700)]
squash -Wunused-parameter warnings in on_hideconsolebtn_clicked
Matthew Fernandez [Mon, 19 Apr 2021 00:37:56 +0000 (17:37 -0700)]
squash -Wunused-parameter warnings in on_clearconsolebtn_clicked
Matthew Fernandez [Mon, 19 Apr 2021 00:37:09 +0000 (17:37 -0700)]
squash -Wunused-parameter warnings in frmObjectBtnCancel_clicked
Matthew Fernandez [Mon, 19 Apr 2021 00:36:35 +0000 (17:36 -0700)]
squash -Wunused-parameter warnings in frmObjectBtnOK_clicked
Matthew Fernandez [Mon, 19 Apr 2021 00:36:00 +0000 (17:36 -0700)]
squash -Wunused-parameter warning in frmObject_set_scroll
Matthew Fernandez [Mon, 19 Apr 2021 00:34:14 +0000 (17:34 -0700)]
squash -Wunused-parameter warning in attr_widgets_modifiedSlot
Matthew Fernandez [Mon, 19 Apr 2021 00:33:44 +0000 (17:33 -0700)]
squash -Wunused-parameter warnings in on_dlgOpenGraph_btncancel_clicked
Matthew Fernandez [Mon, 19 Apr 2021 00:33:09 +0000 (17:33 -0700)]
squash -Wunused-parameter warnings in on_newNode
Matthew Fernandez [Mon, 19 Apr 2021 00:32:14 +0000 (17:32 -0700)]
remove useless memory leak
It is unclear what this code was attempting to achieve. It allocated memory and
then immediately lost the pointers to this memory.
Matthew Fernandez [Mon, 19 Apr 2021 00:31:41 +0000 (17:31 -0700)]
squash -Wunused-parameter warning in btn_fdp_clicked
Matthew Fernandez [Mon, 19 Apr 2021 00:31:21 +0000 (17:31 -0700)]
squash -Wunused-parameter warning in btn_circo_clicked
Matthew Fernandez [Mon, 19 Apr 2021 00:31:02 +0000 (17:31 -0700)]
squash -Wunused-parameter warning in btn_twopi_clicked
Matthew Fernandez [Mon, 19 Apr 2021 00:30:35 +0000 (17:30 -0700)]
squash -Wunused-parameter warning in btn_neato_clicked
Matthew Fernandez [Mon, 19 Apr 2021 00:30:12 +0000 (17:30 -0700)]
squash -Wunused-parameter warning in btn_dot_clicked
Matthew Fernandez [Mon, 19 Apr 2021 00:29:43 +0000 (17:29 -0700)]
squash -Wunused-parameter warnings in btn_clicked
Matthew Fernandez [Mon, 19 Apr 2021 00:29:18 +0000 (17:29 -0700)]
squash -Wunused-parameter warnings in remove_graph_clicked
Matthew Fernandez [Mon, 19 Apr 2021 00:28:50 +0000 (17:28 -0700)]
squash -Wunused-parameter warnings in save_as_graph_clicked
Matthew Fernandez [Mon, 19 Apr 2021 00:28:03 +0000 (17:28 -0700)]
squash -Wunused-parameter warnings in open_graph_clicked
Matthew Fernandez [Mon, 19 Apr 2021 00:27:37 +0000 (17:27 -0700)]
squash -Wunused-parameter warnings in new_graph_clicked
Matthew Fernandez [Mon, 19 Apr 2021 00:26:47 +0000 (17:26 -0700)]
remove curse word from comment
There's no need for this in the code base.
Matthew Fernandez [Mon, 19 Apr 2021 00:25:16 +0000 (17:25 -0700)]
squash -Wunused-parameter warning in motion_notify_event
Matthew Fernandez [Mon, 19 Apr 2021 00:24:04 +0000 (17:24 -0700)]
remove unused key parameter to appmouse_key_release
Matthew Fernandez [Mon, 19 Apr 2021 00:17:47 +0000 (17:17 -0700)]
remove no-op functions appmouse_left_click, appmouse_right_click
This squashes some -Wunused-parameter warnings.
Matthew Fernandez [Mon, 19 Apr 2021 00:15:47 +0000 (17:15 -0700)]
squash -Wunused parameter warnings in scroll_event
Matthew Fernandez [Mon, 19 Apr 2021 00:11:48 +0000 (17:11 -0700)]
squash -Wunused-parameter warnings in key_release_event
Matthew Fernandez [Mon, 19 Apr 2021 00:11:22 +0000 (17:11 -0700)]
squash -Wunused-parameter warnings in key_press_event
Matthew Fernandez [Mon, 19 Apr 2021 00:10:53 +0000 (17:10 -0700)]
remove some excess white space