These variables and numerous others in `gvgen` should probably be using
`size_t`. But everywhere else is using `int` currently, so this change at least
makes things consistent and squashes five -Wsign-conversion warnings.
All paths in this case end in a call to `exit`. But the compiler is apparently
unable to determine this, so use an explicit `break` to suppress a false
positive warning.
mm2gv: squash -Wconversion warnings for 'tolower' usage
For historical reasons, C functions/macros like `tolower` are specified to take
and return an `int`. This means sometimes one set of pedantic compilers (MinGW
with -Wconversion) complains about passing `char` values into these ctype.h
interfaces and another set of pedantic compilers (GCC with -Wconversion)
complains about coercing the result into a `char`. This change suppresses both
of these false positives.
David Seifert [Sat, 14 May 2022 17:40:31 +0000 (19:40 +0200)]
Augment QMAKE detection
* Many distros (Gentoo included) version qmake nowadays. For Qt 6,
The Qt Company has decided to use `qmake6` for versioning, and
many distros have followed this and used the same approach for Qt 5.
neatogen: remove unused 'total_gap' in 'constrained_majorization_new_with_gaps'
The CMake macOS CI job has begun erroring out:
…/lib/neatogen/quad_prog_solve.c:602:11: error: variable 'total_gap' set but
not used [-Werror,-Wunused-but-set-variable]
float total_gap, target_place;
^
While the error is accurate, nothing has changed on our side that would have
caused this. I can only assume Gitlab have upgraded the macOS runners to pull in
a new version of Clang.
mingle: remove unused 'len_total' in 'pedge_export_gv'
The CMake macOS CI job has begun erroring out:
…/lib/mingle/edge_bundling.cpp:208:27: error: variable 'len_total' set but not
used [-Werror,-Wunused-but-set-variable]
double maxwgt = 0, len, len_total, len_total0;
^
While the error is accurate, nothing has changed on our side that would have
caused this. I can only assume Gitlab have upgraded the macOS runners to pull in
a new version of Clang.
mingle: remove unused 'total_wgt' in 'agglomerative_ink_bundling_internal'
The CMake macOS CI job has begun erroring out:
…/lib/mingle/agglomerative_bundling.cpp:400:27: error: variable 'total_wgt'
set but not used [-Werror,-Wunused-but-set-variable]
double eps = 0., wgt, total_wgt = 0;
^
While the error is accurate, nothing has changed on our side that would have
caused this. I can only assume Gitlab have upgraded the macOS runners to pull in
a new version of Clang.
edgepaint: remove unused 'nnodes' in 'node_distinct_coloring'
The CMake macOS CI job has begun erroring out:
…/lib/edgepaint/node_distinct_coloring.c:204:17: error: variable 'nnodes'
set but not used [-Werror,-Wunused-but-set-variable]
int i, j, jj, nnodes = 0;
^
While the error is accurate, nothing has changed on our side that would have
caused this. I can only assume Gitlab have upgraded the macOS runners to pull in
a new version of Clang.
cgraph: replace unchecked agxbuf allocations with alloc helpers
These allocations are at the core of some work Graphviz does and were not
checked for failure. This change swaps confusing crashes on out-of-memory for a
more graceful exit.
smyrna: squash -Wmaybe-uninitialized warnings in 'set_boundaries'
This code is assuming there is at least one point to scan in the loop. In case
there is not (and to pacify the compiler) set an initial trivial bounding box.
The `cobertura` keyword was deprecated in March¹ and then completely removed on
2022-05-05,² causing all CI pipelines to now fail. This is an attempt to migrate
to the new syntax. More details in
https://gitlab.com/gitlab-org/gitlab/-/issues/361615.
For a long time, there has been confusion in the source tree with tests/ and
rtest/ each containing part of the test suite. These were initially distinct,
but over time files in tests/ have begun importing or referring to sources in
rtest/. This has been a common point of confusion for newcomers to the project:
tests/ is the logical place the test suite should live, so they run that, but
then discover it is not the full test suite.
The diff for this commit is large, so it is challenging to see that it is not a
complex change:
1. Merge rtest/Makefile.am into tests/Makefile.am
2. `git mv rtest/* tests/*`
3. Adjust all Pytest invocations from `… ci/tests.py rtest tests` to
`… ci/tests.py tests`
4. Adjust all other references to rtest/ to tests/ (e.g. .gitignore)
Now seems to be a brief period of calm when edits to the test suite are not
in-flight, so we have less chance of a painful merge conflict. The problem of a
large part of the rtest/rtest.py suite being disabled remains and is not
affected by this commit.
David Seifert [Mon, 2 May 2022 20:30:58 +0000 (22:30 +0200)]
Move unconditional `man_MANS` -> `dist_man_MANS`
* Avoids the repetition in `EXTRA_DIST`, and is the recommended
Automake pattern.
* Some `man_MANS` will have to remain, since Automake has a bug
where `dist_man_MANS` in Automake branches do not get included
in the tarball:
https://lists.gnu.org/archive/html/bug-automake/2008-06/msg00019.html
Note that this does not introduce an extra build dependency in any of the three
build systems:
1. Autotools: these steps are done during construction of the portable source
tarball, during which Python 3 is already required (see autogen.sh).
2. CMake: Python 3 is already required by and used in the top level
CMakeLists.txt.
3. MS Build: Python 3 is already used in version generation in
lib/version/version.vcxproj.
This change is motivated by the goal of removing a dependency on Awk. This
commit removes the last remaining Awk usage in all three build systems, as well
as removing dependencies on `type` and `sort` in the MS Build build system.
This commit removes the generation of the intermediate artifacts color_lib,
color_lib-sort, and color_lib-temp. Instead, we generate only the final
artifact, colortbl.h. This consolidation of logic into Python is part of what
allows the removal of dependencies described above.
Note that this does not introduce an extra build dependency in any of the three
build systems:
1. Autotools: these steps are done during construction of the portable source
tarball, during which Python 3 is already required (see autogen.sh).
2. CMake: Python 3 is already required by and used in the top level
CMakeLists.txt.
3. MS Build: Python 3 is already used in version generation in
lib/version/version.vcxproj.
This change is motivated by the goal of removing a dependency on Awk. Though it
also conveniently side steps some line ending portability issues that were being
worked around with `AWK_OPTIONS`. In Python, this is unnecessary because reading
a file in text mode accounts for both flavors of line endings.
sparse: unconditionally include 'graphviz_exit' from cgraph
This fixes a problem encountered in an upcoming commit, that other code cannot
include both this header and cgraph/exit.h if it is building in standalone mode.
cgraph/exit.h is header-only, so should be fine to use even in standalone mode.
Similar to 89edf3fe0ac0378b7d1297a0ca349a15bade3980, this introduces support for
newer versions of Pango. Without this, strict compilation with -Werror in the
CMake build fails when building against Pango ≥ 1.50. The only LASi font
variants are `NORMAL_VARIANT` and `SMALLCAPS`, so mapping Pango to LASi
equivalents is limited to being a coarse-grained lossy conversion.