]> granicus.if.org Git - graphviz/log
graphviz
2 years agoexpr: remove dereferencing and parens around calling 'Exdisc_t.keyf'
Matthew Fernandez [Fri, 5 Aug 2022 04:29:21 +0000 (21:29 -0700)]
expr: remove dereferencing and parens around calling 'Exdisc_t.keyf'

The compiler does not need to be explicitly told how to call through a function
pointer.

2 years agoexpr: remove unused parameters from 'Exdisc_t.keyf'
Matthew Fernandez [Fri, 5 Aug 2022 04:28:01 +0000 (21:28 -0700)]
expr: remove unused parameters from 'Exdisc_t.keyf'

I guess when I committed 2e9753d9c9886f5bc013212420528e9a18bc592b it was not
obvious to me that this is entirely part of private internal interfaces and the
callback signature involved is not exposed publicly.

2 years agoexpr: remove dereferencing and parens around calling 'Exdisc_t.stringof'
Matthew Fernandez [Fri, 5 Aug 2022 04:23:19 +0000 (21:23 -0700)]
expr: remove dereferencing and parens around calling 'Exdisc_t.stringof'

The compiler does not need to be explicitly told how to call through a function
pointer.

2 years agoexpr: remove dereferencing and parens around calling 'Exdisc_t.typename'
Matthew Fernandez [Fri, 5 Aug 2022 04:21:45 +0000 (21:21 -0700)]
expr: remove dereferencing and parens around calling 'Exdisc_t.typename'

The compiler does not need to be explicitly told how to call through a function
pointer.

2 years agoexpr: remove unused 'pg' parameter from 'Exdisc_t.typename'
Matthew Fernandez [Fri, 5 Aug 2022 04:20:54 +0000 (21:20 -0700)]
expr: remove unused 'pg' parameter from 'Exdisc_t.typename'

2 years agoexpr: remove dereferencing and parens around calling 'Exdisc_t.binaryf'
Matthew Fernandez [Fri, 5 Aug 2022 04:16:27 +0000 (21:16 -0700)]
expr: remove dereferencing and parens around calling 'Exdisc_t.binaryf'

The compiler does not need to be explicitly told how to call through a function
pointer.

2 years agoexpr: remove unused parameters from 'Exdisc_t.binaryf'
Matthew Fernandez [Fri, 5 Aug 2022 04:15:09 +0000 (21:15 -0700)]
expr: remove unused parameters from 'Exdisc_t.binaryf'

I guess when I committed b0ec7b2eb448a2cb68ffb3751e9e054aecc60c24 it was not
obvious to me that this is entirely part of private internal interfaces and the
callback signature involved is not exposed publicly.

2 years agoexpr: remove dereferencing and parens around calling 'Exdisc_t.convertf'
Matthew Fernandez [Fri, 5 Aug 2022 04:10:26 +0000 (21:10 -0700)]
expr: remove dereferencing and parens around calling 'Exdisc_t.convertf'

The compiler does not need to be explicitly told how to call through a function
pointer.

2 years agoexpr: remove unused parameters from 'Exdisc_t.convertf'
Matthew Fernandez [Fri, 5 Aug 2022 04:07:55 +0000 (21:07 -0700)]
expr: remove unused parameters from 'Exdisc_t.convertf'

I guess when I committed 17479ab6569d40a4778870f712226aa7916f3ca3 it was not
obvious to me that this is entirely part of private internal interfaces and the
callback signature involved is not exposed publicly.

2 years agoexpr: remove dereferencing and parens around calling 'Exdisc_t.reff'
Matthew Fernandez [Fri, 5 Aug 2022 03:56:27 +0000 (20:56 -0700)]
expr: remove dereferencing and parens around calling 'Exdisc_t.reff'

The compiler does not need to be explicitly told how to call through a function
pointer.

2 years agoexpr: remove further unused parameters from 'Exdisc_t.reff'
Matthew Fernandez [Fri, 5 Aug 2022 03:49:08 +0000 (20:49 -0700)]
expr: remove further unused parameters from 'Exdisc_t.reff'

I guess when I committed ef3ed2a98a46d0641d936c62fde78e719cef98f8 it was not
obvious to me that this is entirely part of private internal interfaces and the
callback signature involved is not exposed publicly.

2 years agoexpr: remove now unused 'disc' parameter from 'Exdisc_t.reff'
Matthew Fernandez [Fri, 5 Aug 2022 03:46:42 +0000 (20:46 -0700)]
expr: remove now unused 'disc' parameter from 'Exdisc_t.reff'

2 years agoexpr: replace 'exdump' SFIO buffer with an 'agxbuf'
Matthew Fernandez [Fri, 5 Aug 2022 03:36:32 +0000 (20:36 -0700)]
expr: replace 'exdump' SFIO buffer with an 'agxbuf'

Unfortunately there is no easy way to stage this. We need to do it all at once,
updating every use of `deparse` and all `exdump`’s internals.

This change improves locality – it is more obvious to both users and the
compiler that the contents of this temporary buffer does not need to be retained
beyond calls to `exerror`. This is a small step towards deprecating SFIO.

Gitlab: #1873

2 years agoexpr: inline private state into 'Excc_t'
Matthew Fernandez [Fri, 5 Aug 2022 02:13:43 +0000 (19:13 -0700)]
expr: inline private state into 'Excc_t'

Now that `Excc_t` is encapsulated in excc.c and no longer considered an
extensible struct, we can stop playing macro tricks to give it extra fields and
just express these more naturally.

2 years agoexpr: move 'Excc_t', 'Exccdisc_t' into excc.c
Matthew Fernandez [Fri, 5 Aug 2022 02:09:43 +0000 (19:09 -0700)]
expr: move 'Excc_t', 'Exccdisc_t' into excc.c

Following the previous commit, these are no longer referenced anywhere else.

2 years agoexpr: make 'exccopen', 'exccclose' static
Matthew Fernandez [Fri, 5 Aug 2022 01:59:13 +0000 (18:59 -0700)]
expr: make 'exccopen', 'exccclose' static

These are not used outside of their containing file, and making them private
will enable some more impactful clean up.

2 years agoexpr gen: remove dereferencing and parens on function pointer
Matthew Fernandez [Fri, 5 Aug 2022 01:48:41 +0000 (18:48 -0700)]
expr gen: remove dereferencing and parens on function pointer

The compiler knows how to call through a function pointer without needing to be
explicitly told.

2 years agoexpr exccopen: only pass SFIO stream to callback
Matthew Fernandez [Fri, 5 Aug 2022 01:41:06 +0000 (18:41 -0700)]
expr exccopen: only pass SFIO stream to callback

This function invokes `dtwalk` passing the callback `global` to be called with
a state parameter it supplies. It was supplying `cc`, but the callback only uses
a single member of this struct. So we can simplify this code by just passing the
stream the callback writes to, `cc->ccdisc-text`, or equivalently `disc->text`.

2 years agoMerge branch 'smattr/b76f3f9f-2903-4d65-bbfd-8ce53a769f47' into 'main'
Matthew Fernandez [Thu, 4 Aug 2022 02:07:58 +0000 (02:07 +0000)]
Merge branch 'smattr/b76f3f9f-2903-4d65-bbfd-8ce53a769f47' into 'main'

warning squashing and removing unused 'flag' parameters

See merge request graphviz/graphviz!2775

2 years agosfdpgen SparseStressMajorizationSmoother_new: remove 'scale_initial_coord' param
Matthew Fernandez [Sat, 30 Jul 2022 01:17:00 +0000 (18:17 -0700)]
sfdpgen SparseStressMajorizationSmoother_new: remove 'scale_initial_coord' param

This is always set to true.

2 years agosfdpgen SparseStressMajorizationSmoother_new: remove inverse distance weighting
Matthew Fernandez [Sat, 30 Jul 2022 01:11:26 +0000 (18:11 -0700)]
sfdpgen SparseStressMajorizationSmoother_new: remove inverse distance weighting

This scheme is unused.

2 years agogvmap makeMap: remove now unused 'flag' local
Matthew Fernandez [Sat, 30 Jul 2022 01:06:19 +0000 (18:06 -0700)]
gvmap makeMap: remove now unused 'flag' local

2 years agogvmap make_map_from_rectangle_groups: remove now unused 'flag' parameter
Matthew Fernandez [Sat, 30 Jul 2022 01:01:06 +0000 (18:01 -0700)]
gvmap make_map_from_rectangle_groups: remove now unused 'flag' parameter

2 years agogvmap make_map_internal: remove 'flag' parameter
Matthew Fernandez [Sat, 30 Jul 2022 00:56:38 +0000 (17:56 -0700)]
gvmap make_map_internal: remove 'flag' parameter

This is always set to 0 and conveys no information to the caller.

2 years agosparse QuadTree_get_nearest: remove 'flag' parameter
Matthew Fernandez [Sat, 30 Jul 2022 00:52:12 +0000 (17:52 -0700)]
sparse QuadTree_get_nearest: remove 'flag' parameter

This is always set to 0 and conveys no information to the caller.

2 years agosparse QuadTree_get_nearest_internal: remove 'flag' parameter
Matthew Fernandez [Sat, 30 Jul 2022 00:42:04 +0000 (17:42 -0700)]
sparse QuadTree_get_nearest_internal: remove 'flag' parameter

This is always set to 0 and conveys no information to the caller.

2 years agosfdpgen: remove unnecessary casts of 'Operator.data' pointers
Matthew Fernandez [Sat, 30 Jul 2022 00:39:34 +0000 (17:39 -0700)]
sfdpgen: remove unnecessary casts of 'Operator.data' pointers

2 years agosfdpgen SparseMatrix_solve: remove 'flag' parameter
Matthew Fernandez [Sat, 30 Jul 2022 00:35:04 +0000 (17:35 -0700)]
sfdpgen SparseMatrix_solve: remove 'flag' parameter

This is always set to 0 and conveys no information to the caller.

2 years agosfdpgen SparseMatrix_solve: remove unused Jacobi matrix solving
Matthew Fernandez [Sat, 30 Jul 2022 00:30:23 +0000 (17:30 -0700)]
sfdpgen SparseMatrix_solve: remove unused Jacobi matrix solving

This also removes the `method` parameter to this function, which was only ever
set to a single value. This squashes 8 compiler warnings and drops a lot of dead
code.

2 years agoneatogen constrained_majorization_vpsc: s/fabs/fabsf when dealing with floats
Matthew Fernandez [Sat, 30 Jul 2022 00:07:17 +0000 (17:07 -0700)]
neatogen constrained_majorization_vpsc: s/fabs/fabsf when dealing with floats

This squashes a -Wfloat-conversion warning.

2 years agoneatogen stress_majorization_cola: remove unused 'nedges_graph' parameter
Matthew Fernandez [Sat, 30 Jul 2022 00:05:50 +0000 (17:05 -0700)]
neatogen stress_majorization_cola: remove unused 'nedges_graph' parameter

2 years agoneatogen tweakEnd: remove unused 'pl' parameter
Matthew Fernandez [Sat, 30 Jul 2022 00:24:05 +0000 (17:24 -0700)]
neatogen tweakEnd: remove unused 'pl' parameter

2 years agoneatogen addTriEdge: remove unused 'd' parameter
Matthew Fernandez [Sat, 30 Jul 2022 00:24:05 +0000 (17:24 -0700)]
neatogen addTriEdge: remove unused 'd' parameter

This function was ignoring the parameter and calculating the edge distance
itself internally.

2 years agoMerge branch 'point-test-doc' into 'main'
Matthew Fernandez [Wed, 3 Aug 2022 02:57:42 +0000 (02:57 +0000)]
Merge branch 'point-test-doc' into 'main'

pointset: doxygen comments

See merge request graphviz/graphviz!2700

2 years agopointset: doxygen comments
Costa Shulyupin [Wed, 3 Aug 2022 02:57:41 +0000 (02:57 +0000)]
pointset: doxygen comments

2 years agoMerge branch 'partition-doc' into 'main'
Matthew Fernandez [Wed, 3 Aug 2022 01:22:37 +0000 (01:22 +0000)]
Merge branch 'partition-doc' into 'main'

partition.h: add doxygen comments

See merge request graphviz/graphviz!2707

2 years agopartition.h: add doxygen comments
Costa Shulyupin [Sat, 28 May 2022 04:11:52 +0000 (07:11 +0300)]
partition.h: add doxygen comments

2 years agopartition.h: add names of arguments
Costa Shulyupin [Sat, 28 May 2022 04:13:06 +0000 (07:13 +0300)]
partition.h: add names of arguments

and remove by the way redundant `extern`

2 years agoMerge branch 'smattr/312b41d1-07fa-4afd-911f-b761fdd0d6db' into 'main'
Matthew Fernandez [Tue, 2 Aug 2022 05:31:31 +0000 (05:31 +0000)]
Merge branch 'smattr/312b41d1-07fa-4afd-911f-b761fdd0d6db' into 'main'

gvpr warning squashing

See merge request graphviz/graphviz!2774

2 years agogvpr canontoken: use char instead of unsigned char, introduce casts
Matthew Fernandez [Thu, 28 Jul 2022 02:21:45 +0000 (19:21 -0700)]
gvpr canontoken: use char instead of unsigned char, introduce casts

It is not clear to me why this code was using unsigned char when it can do the
same thing with less typing and fewer compiler warnings using char. This also
introduces casts to squash warnings from some of the more pedantic compiler
implementations. See 6c29170f9f29466374fbc6e8e62a1b6916c6bc59 for details.

2 years agogvpr canontoken: remove commented out code
Matthew Fernandez [Thu, 28 Jul 2022 02:17:37 +0000 (19:17 -0700)]
gvpr canontoken: remove commented out code

2 years agogvpr readLine: squash -Wconversion warnings
Matthew Fernandez [Thu, 28 Jul 2022 02:13:15 +0000 (19:13 -0700)]
gvpr readLine: squash -Wconversion warnings

`c` is guaranteed to fit in a char here.

2 years agogvpr freadFile: squash a -Wsign-compare warning
Matthew Fernandez [Thu, 28 Jul 2022 02:11:31 +0000 (19:11 -0700)]
gvpr freadFile: squash a -Wsign-compare warning

2 years agogvpr fwriteFile: squash a -Wsign-compare warning
Matthew Fernandez [Thu, 28 Jul 2022 02:11:01 +0000 (19:11 -0700)]
gvpr fwriteFile: squash a -Wsign-compare warning

2 years agogvpr cloneO: squash a -Wswitch-default warning
Matthew Fernandez [Thu, 28 Jul 2022 02:08:38 +0000 (19:08 -0700)]
gvpr cloneO: squash a -Wswitch-default warning

This switch is exhaustive.

2 years agogvpr copy: squash a -Wswitch-default warning
Matthew Fernandez [Thu, 28 Jul 2022 02:07:24 +0000 (19:07 -0700)]
gvpr copy: squash a -Wswitch-default warning

This switch is exhaustive.

2 years agogvpr rindexOf: return a long instead of int
Matthew Fernandez [Thu, 28 Jul 2022 02:05:51 +0000 (19:05 -0700)]
gvpr rindexOf: return a long instead of int

The only use of this function stores the return value in a long, so lets just
return a long, squashing two compiler warnings.

2 years agogvpr cmppair: squash -Wunused-parameter warnings
Matthew Fernandez [Thu, 28 Jul 2022 01:58:25 +0000 (18:58 -0700)]
gvpr cmppair: squash -Wunused-parameter warnings

This function is used as a callback, so cannot easily have these unused
parameters removed.

2 years agoMerge branch 'smattr/a2930eb8-ba18-4789-bf34-93446083513e' into 'main'
Matthew Fernandez [Sat, 30 Jul 2022 00:56:20 +0000 (00:56 +0000)]
Merge branch 'smattr/a2930eb8-ba18-4789-bf34-93446083513e' into 'main'

lib/ast warning squashing and simplification

See merge request graphviz/graphviz!2773

2 years agoast onematch: simplify string comparisons by using string views
Matthew Fernandez [Sun, 24 Jul 2022 18:06:48 +0000 (11:06 -0700)]
ast onematch: simplify string comparisons by using string views

2 years agoast onematch: fuse comparison against 'xdigi' and 't'
Matthew Fernandez [Sun, 24 Jul 2022 17:49:39 +0000 (10:49 -0700)]
ast onematch: fuse comparison against 'xdigi' and 't'

Freed of the limitations of hash function in the previous commit, we can express
this as a single comparison.

2 years agoast onematch: rephrase hash-based switch into string comparisons
Matthew Fernandez [Sun, 24 Jul 2022 17:44:09 +0000 (10:44 -0700)]
ast onematch: rephrase hash-based switch into string comparisons

This code was using a hand rolled hash function to implement a series of string
comparisons as a jump table. I guess at some point this must have been a
necessary optimization due to limitations of the day’s compilers/machines. In a
modern environment, this is a deoptimization, impeding the compiler’s ability to
understand your intent. Modern compilers know the string comparison functions as
built-ins and can use SIMD¹/SWAR² tricks to emit a short string comparison as a
single instruction. They are also capable of transforming an if-then-else ladder
into a switch if their heuristics predict it will be worthwhile.

¹ https://en.wikipedia.org/wiki/Single_instruction,_multiple_data
² https://en.wikipedia.org/wiki/SWAR

2 years agoast gobble: squash -Wswitch-default warning
Matthew Fernandez [Sun, 24 Jul 2022 17:18:40 +0000 (10:18 -0700)]
ast gobble: squash -Wswitch-default warning

2 years agoast strmatch: squash -Wundef warnings
Matthew Fernandez [Sun, 24 Jul 2022 17:17:53 +0000 (10:17 -0700)]
ast strmatch: squash -Wundef warnings

2 years agoast stresc: squash -Wswitch-default warning
Matthew Fernandez [Sun, 24 Jul 2022 17:07:01 +0000 (10:07 -0700)]
ast stresc: squash -Wswitch-default warning

2 years agoast stresc: remove return value
Matthew Fernandez [Sun, 24 Jul 2022 17:05:08 +0000 (10:05 -0700)]
ast stresc: remove return value

The computation of the return value for this function was relying on string
lengths that fitted in an `int`, something that is generally but not always
true. The compiler complained about this with -Wconversion. The only caller of
this function does not use the return value, so lets just remove it.

2 years agoast: prototype 'pathcanon' in library header instead of inline near its use
Matthew Fernandez [Sun, 24 Jul 2022 16:59:13 +0000 (09:59 -0700)]
ast: prototype 'pathcanon' in library header instead of inline near its use

This squashes a -Wmissing-prototypes, is better style, and is generally inline
with the rest of lib/ast.

2 years agoast fmtbuf: squash -Wsign-compare warning
Matthew Fernandez [Sun, 24 Jul 2022 16:55:56 +0000 (09:55 -0700)]
ast fmtbuf: squash -Wsign-compare warning

This is computing the number of bytes remaining in `buf`; the number of bytes
between a pointer to the current offset and the end of `buf`. Thus it is always
non-negative.

2 years agoast chrtoi: squash -Wswitch-default warning
Matthew Fernandez [Sun, 24 Jul 2022 16:54:52 +0000 (09:54 -0700)]
ast chrtoi: squash -Wswitch-default warning

2 years agoast chrtoi: remove unnecessary cast
Matthew Fernandez [Sun, 24 Jul 2022 16:51:29 +0000 (09:51 -0700)]
ast chrtoi: remove unnecessary cast

2 years agoast chrtoi: squash -Wsign-compare warning
Matthew Fernandez [Sun, 24 Jul 2022 16:50:50 +0000 (09:50 -0700)]
ast chrtoi: squash -Wsign-compare warning

2 years agoMerge branch 'smattr/f2b32419-4ad7-4884-83ff-cc27d7a0667f' into 'main'
Matthew Fernandez [Fri, 29 Jul 2022 01:48:27 +0000 (01:48 +0000)]
Merge branch 'smattr/f2b32419-4ad7-4884-83ff-cc27d7a0667f' into 'main'

sfdpgen warning squashing

See merge request graphviz/graphviz!2772

2 years agosfdpgen: remove unimplemented 'DistanceMatrix_restrict_filtering'
Matthew Fernandez [Sat, 23 Jul 2022 15:42:22 +0000 (08:42 -0700)]
sfdpgen: remove unimplemented 'DistanceMatrix_restrict_filtering'

2 years agosfdpgen maximal_…: remove unused 'randomize' parameter
Matthew Fernandez [Sat, 23 Jul 2022 15:39:08 +0000 (08:39 -0700)]
sfdpgen maximal_…: remove unused 'randomize' parameter

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