Costa Shulyupin [Sun, 3 Apr 2022 08:10:56 +0000 (11:10 +0300)]
squash warning in mm_read_unsymmetric_sparse
warning: ignoring return value of ‘fscanf’, declared with attribute warn_unused_result [-Wunused-result]
On success, these functions return the number of input items
successfully matched and assigned; this can be fewer than
provided for, or even zero, in the event of an early
matching failure.
Costa Shulyupin [Sun, 3 Apr 2022 08:10:41 +0000 (11:10 +0300)]
squash warning in SparseMatrix_import_matrix_market/MATRIX_TYPE_COMPLEX
warning: ignoring return value of ‘fscanf’, declared with attribute warn_unused_result [-Wunused-result]
On success, these functions return the number of input items
successfully matched and assigned; this can be fewer than
provided for, or even zero, in the event of an early
matching failure.
Costa Shulyupin [Sun, 3 Apr 2022 08:10:29 +0000 (11:10 +0300)]
squash warning in SparseMatrix_import_matrix_market/MATRIX_TYPE_PATTERN
warning: ignoring return value of ‘fscanf’, declared with attribute warn_unused_result [-Wunused-result]
On success, these functions return the number of input items
successfully matched and assigned; this can be fewer than
provided for, or even zero, in the event of an early
matching failure.
Costa Shulyupin [Sun, 3 Apr 2022 08:08:47 +0000 (11:08 +0300)]
squash warning in SparseMatrix_import_matrix_market/MATRIX_TYPE_INTEGER
warning: ignoring return value of ‘fscanf’, declared with attribute warn_unused_result [-Wunused-result]
On success, these functions return the number of input items
successfully matched and assigned; this can be fewer than
provided for, or even zero, in the event of an early
matching failure.
Costa Shulyupin [Sun, 3 Apr 2022 08:04:41 +0000 (11:04 +0300)]
squash warning in SparseMatrix_import_matrix_market/MATRIX_TYPE_REAL
warning: ignoring return value of ‘fscanf’, declared with attribute warn_unused_result [-Wunused-result]
On success, these functions return the number of input items
successfully matched and assigned; this can be fewer than
provided for, or even zero, in the event of an early
matching failure.
CMake: standardize on always specifying library paths in 'install' steps
Given the differences in how Windows vs everything else treats library vs binary
paths, it seems clearer and less confusing to always specify `RUNTIME`,
`LIBRARY`, and `ARCHIVE` paths during `install` steps. This also avoids
accidentally installing libraries to incorrect paths if they are considered for
installation as dependents of a binary, though I do not know whether this
behavior ever occurs.
`target_include_directories` supports relative paths that are interpreted
relative to the current source directory. So we can write these paths shorter
and more obviously.
The third-party library Svgpp calls Boost in a way that is deprecated, resulting
in compiler warnings during the CMake build. This change teaches CMake that none
of this is our code and we do not want to be warned about it.
Given the prior commit rewrote every byte in this file, we may as well also fix
the odd white space decisions here while we are at it. Though it is unclear who
if anyone uses this tool any more.
Of all the source files in the Graphviz tree, this file alone was encoded in
UTF-16 with a BOM.¹ BOMs have mostly fallen out of favor these days, with people
preferring to let the host operating system or locale determine encoding. Git
will happily translate text files to your local encoding on checkout. With that
in mind, we can convert this file to UTF-8 and stop forcing developers on other
operating systems to pay the price for Windows’ poor past decisions.
xlib plugin handle_file_events: more tightly scope a long-lived dynamic buffer
This buffer was being retained in a long-lived `static` pointer, increasing peak
memory usage and making it harder to use tools like Valgrind and ASan with
Graphviz. This change makes it more obvious to both users and tools what this
buffer is used for.
Note this also tweaks an error message to be more informative.
This seems to have gone unnoticed because none of the Graphviz components
currently integrated into the CMake build system rely critically on fcntl.h.
This issue was discovered when integrating the xlib plugin.
Costa Shulyupin [Sun, 27 Mar 2022 04:09:51 +0000 (07:09 +0300)]
gvpr: initialize a variable
Squash
warning: ‘alpha’ may be used uninitialized in this function
One branch of conditional statement leaves variable alpha
uninitialized. Actually uninitialized value is not used,
but compiler still complains. So just add one assignment to
assumed 0.
BTW, the code can be refactored and shortened.
But it is preferable to just minimize the changes.
04a78cc9ae01b2a7e5d5435146cd503c45af90b9 disabled Lefty in the Autotools build
system. The only fall out from this seems to have been Gentoo discovering
mistakes in the Graphviz Autotools files.¹ With mild evidence that there is no
one downstream relying on Lefty, we take the next step in its removal. If
another three months pass with no issues, we can remove Lefty from the Graphviz
tree altogether.
CC: David Seifert <soap@gentoo.org>
Gitlab: related to #1836, #1854