]> granicus.if.org Git - graphviz/log
graphviz
4 years agoremove unnecessary tclpkg/tcldot include path
Matthew Fernandez [Thu, 3 Sep 2020 03:27:30 +0000 (20:27 -0700)]
remove unnecessary tclpkg/tcldot include path

4 years agodisambiguate tclpkg/gv #includes
Matthew Fernandez [Thu, 3 Sep 2020 02:46:29 +0000 (19:46 -0700)]
disambiguate tclpkg/gv #includes

Related to #1242 and #1785.

4 years agoremove unnecessary tclpkg/gv include path
Matthew Fernandez [Thu, 3 Sep 2020 02:32:17 +0000 (19:32 -0700)]
remove unnecessary tclpkg/gv include path

4 years agoMerge branch '4a751607-966c-4130-84cb-77a26d194de8' into 'master'
Matthew Fernandez [Sun, 27 Sep 2020 02:17:39 +0000 (02:17 +0000)]
Merge branch '4a751607-966c-4130-84cb-77a26d194de8' into 'master'

drop explicit libstdc++ references, allowing linking with libc++

Closes #163

See merge request graphviz/graphviz!1586

4 years agoremove explicit linking of libstdc++
Matthew Fernandez [Mon, 21 Sep 2020 00:38:52 +0000 (17:38 -0700)]
remove explicit linking of libstdc++

The autotools build should now be compatible with libc++. Closes #163.

4 years agoforce the C++ compiler to be used when linking C++-dependent targets
Matthew Fernandez [Mon, 21 Sep 2020 00:36:22 +0000 (17:36 -0700)]
force the C++ compiler to be used when linking C++-dependent targets

This looks pretty hacky, but is apparently the libtool-sanctioned way of doing
this [0]. Related to #163.

  [0]: https://www.gnu.org/software/automake/manual/automake.html#Libtool-Convenience-Libraries

4 years agoremove duplicated Makefile content
Matthew Fernandez [Mon, 21 Sep 2020 00:17:24 +0000 (17:17 -0700)]
remove duplicated Makefile content

4 years agoMerge branch '23CD380E-C5C0-414F-B23F-122C42B26417' into 'master'
Matthew Fernandez [Sat, 26 Sep 2020 01:28:05 +0000 (01:28 +0000)]
Merge branch '23CD380E-C5C0-414F-B23F-122C42B26417' into 'master'

remove testing pieces from CMake build

Closes #1795

See merge request graphviz/graphviz!1584

4 years agoremove testing pieces from CMake build
Matthew Fernandez [Sat, 19 Sep 2020 17:19:49 +0000 (10:19 -0700)]
remove testing pieces from CMake build

The existing test fragments in the CMake files had two undesirable effects:

  1. Projects using Graphviz as a subdirectory would pick up this test suite and
     it would get run as part of their own test suite. See #1795.

  2. The fragments incorrectly gave the impression this was the canonical set of
     Graphviz tests and/or that this is what was run in CI. The current reality
     is that CI ignores this path to a subset of the tests, and most of the
     maintainers do not run this either.

4 years agoremove build system workaround for GCC 3
Matthew Fernandez [Sat, 19 Sep 2020 17:00:32 +0000 (10:00 -0700)]
remove build system workaround for GCC 3

We no longer support anything below GCC 4.4.7.

4 years agodon't squash -O2 when using ICC
Matthew Fernandez [Sat, 19 Sep 2020 16:56:58 +0000 (09:56 -0700)]
don't squash -O2 when using ICC

ICC is Intel's C Compiler. All recent versions of it *do* support `-O2`.

4 years agoMerge branch '803B960B-999F-41B4-981C-21E1EB0BB124' into 'master'
Matthew Fernandez [Sat, 26 Sep 2020 01:05:01 +0000 (01:05 +0000)]
Merge branch '803B960B-999F-41B4-981C-21E1EB0BB124' into 'master'

remove eFence support

Closes #1827

See merge request graphviz/graphviz!1585

4 years agoremove eFence support
Matthew Fernandez [Sat, 19 Sep 2020 21:35:02 +0000 (14:35 -0700)]
remove eFence support

The eFence memory debugging tool has these days been superseded by Valgrind and
Address Sanitizer. Closes #1827.

4 years agoremove commented out library checks
Matthew Fernandez [Sat, 19 Sep 2020 21:34:10 +0000 (14:34 -0700)]
remove commented out library checks

4 years agoremove legacy comment
Matthew Fernandez [Sat, 19 Sep 2020 21:33:01 +0000 (14:33 -0700)]
remove legacy comment

4 years agoMerge branch '6B1AB424-B66A-42CC-B5CF-BAC9AEEF6129' into 'master'
Matthew Fernandez [Fri, 25 Sep 2020 15:41:02 +0000 (15:41 +0000)]
Merge branch '6B1AB424-B66A-42CC-B5CF-BAC9AEEF6129' into 'master'

miscellaneous cleanup

See merge request graphviz/graphviz!1583

4 years agoremove ignore rules from some legacy files
Matthew Fernandez [Sat, 19 Sep 2020 01:02:16 +0000 (18:02 -0700)]
remove ignore rules from some legacy files

libgraph was removed in d5f98556f654b41e5fdabd2d6f7528256bdea519.

4 years agoremove commented out strToL
Matthew Fernandez [Sat, 19 Sep 2020 00:57:21 +0000 (17:57 -0700)]
remove commented out strToL

4 years agoremove Windows strto[u]ll redirects
Matthew Fernandez [Sat, 19 Sep 2020 00:55:02 +0000 (17:55 -0700)]
remove Windows strto[u]ll redirects

These functions exist on Windows. There is no need to remap them.

4 years agoremove unused 'external'
Matthew Fernandez [Sat, 19 Sep 2020 00:45:15 +0000 (17:45 -0700)]
remove unused 'external'

4 years agoremove unused 'cast'
Matthew Fernandez [Sat, 19 Sep 2020 00:43:56 +0000 (17:43 -0700)]
remove unused 'cast'

4 years agoMerge branch 'fix-linux-cmake-and-add-test-job-to-ci' into 'master'
Magnus Jacobsson [Wed, 23 Sep 2020 06:55:59 +0000 (06:55 +0000)]
Merge branch 'fix-linux-cmake-and-add-test-job-to-ci' into 'master'

Add Linux CMake test job to CI (including needed generation of a .deb package and correction of some linking problems)

See merge request graphviz/graphviz!1578

4 years agoAdd skip of format png:gd also for Linux CMake rtest
Magnus Jacobsson [Tue, 15 Sep 2020 14:02:51 +0000 (16:02 +0200)]
Add skip of format png:gd also for Linux CMake rtest

4 years agoAdd skip of PNG diff for also for Linux CMake rtest
Magnus Jacobsson [Tue, 15 Sep 2020 13:21:43 +0000 (15:21 +0200)]
Add skip of PNG diff for also for Linux CMake rtest

4 years agoAdd skip of test_1813 also for Linux CMake
Magnus Jacobsson [Mon, 14 Sep 2020 22:23:54 +0000 (00:23 +0200)]
Add skip of test_1813 also for Linux CMake

4 years agoAdd ubuntu18-04-cmake-test job to CI
Magnus Jacobsson [Fri, 11 Sep 2020 05:45:09 +0000 (07:45 +0200)]
Add ubuntu18-04-cmake-test job to CI

Also adapt existing test jobs to accomodate this.

4 years agoFix lib/pack objs not included in lib/gvc dynamic lib for CMake builds
Magnus Jacobsson [Mon, 14 Sep 2020 21:34:49 +0000 (23:34 +0200)]
Fix lib/pack objs not included in lib/gvc dynamic lib for CMake builds

This is what the autotools builds do.

For some reason this was not a problem on Windows.

Without this, the rtest/test_examples.py gave errors like this for neatopack.c:

neatopack.c:(.text+0x81): undefined reference to `ccomps'

4 years agoFix lib/common objs not included in lib/gvc lib for CMake builds
Magnus Jacobsson [Mon, 14 Sep 2020 13:18:42 +0000 (15:18 +0200)]
Fix lib/common objs not included in lib/gvc lib for CMake builds

This is what the autotools builds do.

For some reason this was not a problem on Windows.

Without this, the rtest/test_examples.py gave errors like this for e.g. demo.c:

demo.c:(.text+0x29): undefined reference to `gvParseArgs'

4 years agoCorrect link library order for mm2gv
Magnus Jacobsson [Tue, 15 Sep 2020 11:58:55 +0000 (13:58 +0200)]
Correct link library order for mm2gv

The sparse lib depends on many of the libs that were listed before it.

An upcoming change to lib/gvc revealed this and without this change,
the following link error would occur:

../../lib/sparse/libsparse.a(SparseMatrix.c.o): In function `SparseMatrix_page_rank':
SparseMatrix.c:(.text+0x12471): undefined reference to `Verbose'

4 years agoFix math library not linked with lib/sparse and remove from gvpack
Magnus Jacobsson [Fri, 18 Sep 2020 09:11:44 +0000 (11:11 +0200)]
Fix math library not linked with lib/sparse and remove from gvpack

The gvpack tool only uses math functions indirectly through other
libraries including plugin/neato_layout which use lib/sparse.

4 years agoRemove obsolete Linux special add of math target link library
Magnus Jacobsson [Mon, 14 Sep 2020 14:14:32 +0000 (16:14 +0200)]
Remove obsolete Linux special add of math target link library

Since the previous commit, this is no longer necessary for programs
that only use math functions indirectly through lib/gvc.

4 years agoFix math library not linked with lib/gvc for Linux CMake builds
Magnus Jacobsson [Mon, 14 Sep 2020 13:12:49 +0000 (15:12 +0200)]
Fix math library not linked with lib/gvc for Linux CMake builds

This is what the autotools builds do.

$(MATH_LIB) was already referenced by lib/gvc/CmakeLists.txt, but it
was never given any value.

For Windows, this is not necessary since math functions are included
in the Universal C Runtime library (UCRT).

Without this, the rtest/test_examples.py gave errors like this for e.g. demo.c:

/usr/lib/gcc/x86_64-linux-gnu/7/../../../../lib/libgvc.so: undefined reference to `atan2'

4 years agoArchive Linux CMake builds under Packages/experimental to avoid deployment
Magnus Jacobsson [Fri, 18 Sep 2020 09:55:17 +0000 (11:55 +0200)]
Archive Linux CMake builds under Packages/experimental to avoid deployment

Changes COLLECTION to experimental for Linux CMake builds which causes
the artifacts to be archived under Packages/experimental which is not
deployed to https://www2.graphviz.org/Packages.

4 years agoAdd generation of a Debian package from Ubuntu CMake build
Magnus Jacobsson [Sun, 13 Sep 2020 18:35:13 +0000 (20:35 +0200)]
Add generation of a Debian package from Ubuntu CMake build

Also adapts jobs & scripts.

This does not yet replicate the structure of Debian packages produced
by autotools. Everything is put into one single package named
Graphviz-<version>-Linux.deb.

4 years agoMerge branch '1785-3' into 'master'
Matthew Fernandez [Tue, 22 Sep 2020 15:13:15 +0000 (15:13 +0000)]
Merge branch '1785-3' into 'master'

disambiguate #includes (3/5)

See merge request graphviz/graphviz!1582

4 years agoMerge branch 'afabefdf-dab2-43e5-bacd-ece9214998cd' into 'master'
Matthew Fernandez [Tue, 22 Sep 2020 15:01:38 +0000 (15:01 +0000)]
Merge branch 'afabefdf-dab2-43e5-bacd-ece9214998cd' into 'master'

remove ad hoc name mangling in the gml parser

Closes #1806

See merge request graphviz/graphviz!1580

4 years agodisambiguate plugin/xlib #includes
Matthew Fernandez [Sat, 29 Aug 2020 23:19:41 +0000 (16:19 -0700)]
disambiguate plugin/xlib #includes

Related to #1785.

4 years agoremove unnecessary plugin/xlib include path
Matthew Fernandez [Sat, 29 Aug 2020 23:13:29 +0000 (16:13 -0700)]
remove unnecessary plugin/xlib include path

4 years agodisambiguate plugin/webp #includes
Matthew Fernandez [Sat, 29 Aug 2020 22:53:29 +0000 (15:53 -0700)]
disambiguate plugin/webp #includes

Related to #1785.

4 years agoremove unnecessary plugin/webp include path
Matthew Fernandez [Sat, 29 Aug 2020 22:47:07 +0000 (15:47 -0700)]
remove unnecessary plugin/webp include path

4 years agodisambiguate plugin/visio #includes
Matthew Fernandez [Sat, 29 Aug 2020 22:24:13 +0000 (15:24 -0700)]
disambiguate plugin/visio #includes

Related to #1785.

4 years agoremove unnecessary plugin/visio include path
Matthew Fernandez [Sat, 29 Aug 2020 22:10:06 +0000 (15:10 -0700)]
remove unnecessary plugin/visio include path

4 years agodisambiguate plugin/rsvg #includes
Matthew Fernandez [Sat, 29 Aug 2020 21:44:59 +0000 (14:44 -0700)]
disambiguate plugin/rsvg #includes

Related to #1785.

4 years agoremove unnecessary plugin/rsvg include path
Matthew Fernandez [Sat, 29 Aug 2020 21:37:56 +0000 (14:37 -0700)]
remove unnecessary plugin/rsvg include path

4 years agodisambiguate plugin/quartz #includes
Matthew Fernandez [Sat, 29 Aug 2020 20:13:22 +0000 (13:13 -0700)]
disambiguate plugin/quartz #includes

Related to #1785.

4 years agoremove unnecessary plugin/quartz include path
Matthew Fernandez [Sat, 29 Aug 2020 20:04:27 +0000 (13:04 -0700)]
remove unnecessary plugin/quartz include path

4 years agodisambiguate plugin/poppler #includes
Matthew Fernandez [Sat, 29 Aug 2020 19:43:25 +0000 (12:43 -0700)]
disambiguate plugin/poppler #includes

Related to #1785.

4 years agoremove unnecessary plugin/poppler include path
Matthew Fernandez [Sat, 29 Aug 2020 19:37:01 +0000 (12:37 -0700)]
remove unnecessary plugin/poppler include path

4 years agodisambiguate plugin/pango #includes
Matthew Fernandez [Sat, 29 Aug 2020 19:16:12 +0000 (12:16 -0700)]
disambiguate plugin/pango #includes

Related to #1785.

4 years agoremove unnecessary plugin/pango include path
Matthew Fernandez [Sat, 29 Aug 2020 19:05:13 +0000 (12:05 -0700)]
remove unnecessary plugin/pango include path

4 years agodisambiguate plugin/neato_layout #includes
Matthew Fernandez [Sat, 29 Aug 2020 18:44:03 +0000 (11:44 -0700)]
disambiguate plugin/neato_layout #includes

Related to #1785.

4 years agoremove unnecessary plugin/neato_layout include path
Matthew Fernandez [Sat, 29 Aug 2020 18:35:36 +0000 (11:35 -0700)]
remove unnecessary plugin/neato_layout include path

4 years agodisambiguate plugin/ming #includes
Matthew Fernandez [Sat, 29 Aug 2020 18:14:12 +0000 (11:14 -0700)]
disambiguate plugin/ming #includes

Related to #1785.

4 years agoremove unnecessary plugin/ming include path
Matthew Fernandez [Sat, 29 Aug 2020 18:05:20 +0000 (11:05 -0700)]
remove unnecessary plugin/ming include path

4 years agodisambiguate plugin/lasi #includes
Matthew Fernandez [Sat, 29 Aug 2020 04:51:46 +0000 (21:51 -0700)]
disambiguate plugin/lasi #includes

Related to #1785.

4 years agoremove unnecessary plugin/lasi include path
Matthew Fernandez [Sat, 29 Aug 2020 04:42:21 +0000 (21:42 -0700)]
remove unnecessary plugin/lasi include path

4 years agodisambiguate plugin/gtk #includes
Matthew Fernandez [Sat, 29 Aug 2020 04:21:10 +0000 (21:21 -0700)]
disambiguate plugin/gtk #includes

Related to #1785.

4 years agoremove unnecessary plugin/gtk include path
Matthew Fernandez [Sat, 29 Aug 2020 04:13:32 +0000 (21:13 -0700)]
remove unnecessary plugin/gtk include path

4 years agodisambiguate plugin/gs #includes
Matthew Fernandez [Sat, 29 Aug 2020 03:18:58 +0000 (20:18 -0700)]
disambiguate plugin/gs #includes

Related to #1785.

4 years agoremove unnecessary plugin/gd include path
Matthew Fernandez [Sat, 29 Aug 2020 03:11:25 +0000 (20:11 -0700)]
remove unnecessary plugin/gd include path

4 years agodisambiguate plugin/glitz #includes
Matthew Fernandez [Sat, 29 Aug 2020 02:51:10 +0000 (19:51 -0700)]
disambiguate plugin/glitz #includes

Related to #1785.

4 years agoremove unnecessary plugin/glitz include path
Matthew Fernandez [Sat, 29 Aug 2020 02:38:07 +0000 (19:38 -0700)]
remove unnecessary plugin/glitz include path

4 years agodisambiguate plugin/gdk #includes
Matthew Fernandez [Sat, 29 Aug 2020 01:54:19 +0000 (18:54 -0700)]
disambiguate plugin/gdk #includes

Related to #1785.

4 years agoremove unnecessary plugin/gdk include path
Matthew Fernandez [Sat, 29 Aug 2020 01:44:57 +0000 (18:44 -0700)]
remove unnecessary plugin/gdk include path

4 years agodisambiguate plugin/gdiplus #includes
Matthew Fernandez [Sat, 29 Aug 2020 01:01:27 +0000 (18:01 -0700)]
disambiguate plugin/gdiplus #includes

Related to #1785.

4 years agoremove unnecessary plugin/gdiplus include path
Matthew Fernandez [Sat, 29 Aug 2020 00:44:23 +0000 (17:44 -0700)]
remove unnecessary plugin/gdiplus include path

4 years agodisambiguate plugin/gd #includes
Matthew Fernandez [Wed, 26 Aug 2020 02:59:18 +0000 (19:59 -0700)]
disambiguate plugin/gd #includes

Related to #1242 and #1785.

4 years agoremove unnecessary plugin/gd include path
Matthew Fernandez [Wed, 26 Aug 2020 02:42:27 +0000 (19:42 -0700)]
remove unnecessary plugin/gd include path

4 years agodisambiguate plugin/dot_layout #includes
Matthew Fernandez [Wed, 26 Aug 2020 01:53:34 +0000 (18:53 -0700)]
disambiguate plugin/dot_layout #includes

Related to #1785.

4 years agoremove unnecessary plugin/dot_layout include path
Matthew Fernandez [Wed, 26 Aug 2020 01:46:16 +0000 (18:46 -0700)]
remove unnecessary plugin/dot_layout include path

4 years agodisambiguate plugin/devil #includes
Matthew Fernandez [Wed, 26 Aug 2020 01:36:25 +0000 (18:36 -0700)]
disambiguate plugin/devil #includes

Related to #1785.

4 years agoremove unnecessary plugin/devil include path
Matthew Fernandez [Wed, 26 Aug 2020 01:24:19 +0000 (18:24 -0700)]
remove unnecessary plugin/devil include path

4 years agodisambiguate plugin/core #includes
Matthew Fernandez [Tue, 25 Aug 2020 00:48:30 +0000 (17:48 -0700)]
disambiguate plugin/core #includes

Related to #1242 and #1785.

4 years agoremove unnecessary plugin/core include path
Matthew Fernandez [Tue, 25 Aug 2020 00:25:18 +0000 (17:25 -0700)]
remove unnecessary plugin/core include path

4 years agoremove unnecessary intermediate files when generating gml parser
Matthew Fernandez [Wed, 16 Sep 2020 02:17:13 +0000 (19:17 -0700)]
remove unnecessary intermediate files when generating gml parser

Closes #1806.

4 years agoremove now-unnecessary ad hoc replacement of gml parser prefix
Matthew Fernandez [Wed, 16 Sep 2020 02:01:32 +0000 (19:01 -0700)]
remove now-unnecessary ad hoc replacement of gml parser prefix

Related to #1806.

4 years agouse api.prefix to set gml parser's prefix
Matthew Fernandez [Wed, 16 Sep 2020 01:47:30 +0000 (18:47 -0700)]
use api.prefix to set gml parser's prefix

Related to #1806.

4 years agoexplicitly set the output of the gml parser rule
Matthew Fernandez [Wed, 16 Sep 2020 01:28:06 +0000 (18:28 -0700)]
explicitly set the output of the gml parser rule

This has no effect for now, but will once we set an api.prefix. Related to
#1806.

4 years agodrop compatibility with Yacc, Bison < 3 in gml parser
Matthew Fernandez [Wed, 16 Sep 2020 01:24:23 +0000 (18:24 -0700)]
drop compatibility with Yacc, Bison < 3 in gml parser

Other parsers in the tree, e.g. lib/cgraph/grammar.y, already require Bison 3+,
so this does not change build requirements. Related to #1806.

4 years agosuppress Bison warnings from using non-Yacc compatible extensions in gml parser
Matthew Fernandez [Wed, 16 Sep 2020 01:22:32 +0000 (18:22 -0700)]
suppress Bison warnings from using non-Yacc compatible extensions in gml parser

Related to #1806.

4 years agoreplace ad hoc name mangling in gml scanner with Flex's option prefix
Matthew Fernandez [Wed, 16 Sep 2020 00:25:26 +0000 (17:25 -0700)]
replace ad hoc name mangling in gml scanner with Flex's option prefix

This drops compatibility with Lex, but other scanners in the tree, e.g.
lib/cgraph/scan.l already require Flex, so this does not change build
requirements. Related to #1806.

4 years agoremove legacy CMake replacement script
Matthew Fernandez [Wed, 16 Sep 2020 01:13:40 +0000 (18:13 -0700)]
remove legacy CMake replacement script

This should have been removed in 5e78a26f6820b8bf85038f269583ee879022fa3e.
Related to #1806.

4 years agoMerge branch 'fix_ps2pdf' into 'master'
Matthew Fernandez [Tue, 22 Sep 2020 00:03:32 +0000 (00:03 +0000)]
Merge branch 'fix_ps2pdf' into 'master'

Fix failure to create .pdf files with autotools

Closes #1763

See merge request graphviz/graphviz!1577

4 years agoDo not fail if ps2pdf is present and the .pdf files exist
Pierre Labastie [Tue, 15 Sep 2020 08:42:18 +0000 (10:42 +0200)]
Do not fail if ps2pdf is present and the .pdf files exist

If ps2pdf is not present on the system, the build
fails even if the .pdf files exist. The reason is that the .ps
files are created on the fly, and they are more recent than the
distributed .pdf. Makefile then runs "false <something>", which
obviously fails.

Setting PS2PDF to "true" is not a solution because we do not
want to ignore when the .pdf files are really absent.

This patch makes running $(PS2PDF) conditional, but still
imposes the .pdf files to be generated when running "make dist".

4 years agoMerge branch 'a51bdabc-bd7b-4dd0-8515-8970f03c1432' into 'master'
Matthew Fernandez [Sun, 20 Sep 2020 22:53:39 +0000 (22:53 +0000)]
Merge branch 'a51bdabc-bd7b-4dd0-8515-8970f03c1432' into 'master'

implement string mapping of expr parser's token table using Bison feature

See merge request graphviz/graphviz!1576

4 years agoimplement string mapping of expr parser's token table using Bison feature
Matthew Fernandez [Mon, 14 Sep 2020 03:02:48 +0000 (20:02 -0700)]
implement string mapping of expr parser's token table using Bison feature

This removes some juggling to construct a string table of the tokens in the
expr parser, to replace it with native Bison functionality. Loosely related to
#1806.

4 years agoMerge branch '5dfecf35-b8fc-4094-be39-b6b81dab61bd' into 'master'
Matthew Fernandez [Sat, 19 Sep 2020 17:00:55 +0000 (17:00 +0000)]
Merge branch '5dfecf35-b8fc-4094-be39-b6b81dab61bd' into 'master'

fix some Coverity warnings

See merge request graphviz/graphviz!1574

4 years agoremove undefined behavior in VPSC Constraint output
Matthew Fernandez [Sun, 13 Sep 2020 03:51:17 +0000 (20:51 -0700)]
remove undefined behavior in VPSC Constraint output

The address of a reference parameter can never be NULL. A reference parameter
is, definitionally, non-NULL. So taking the address of a reference parameter and
comparing it against NULL is always false. None of the call sites of this
operator passed in NULL, so this change is a no-op from a user perspective, but
it guards against future misuse.

This addresses the following Coverity warning:

  Error: COMPILER_WARNING: [#def230]
  graphviz-2.40.1/lib/vpsc/constraint.cpp: scope_hint: In function 'std::ostream& operator<<(std::ostream&, const Constraint&)'
  graphviz-2.40.1/lib/vpsc/constraint.cpp:46:7: warning: the compiler can assume that the address of 'c' will never be NULL [-Waddress]
  #  if(&c==NULL) {
  #       ^
  #   44|   std::ostream& operator <<(std::ostream &os, const Constraint &c)
  #   45|   {
  #   46|->   if(&c==NULL) {
  #   47|       os<<"NULL";
  #   48|     } else {

Related to #1464.

4 years agofix resource leakage in unflatten
Matthew Fernandez [Sun, 13 Sep 2020 03:24:54 +0000 (20:24 -0700)]
fix resource leakage in unflatten

This addresses the following Coverity warning:

  Error: RESOURCE_LEAK (CWE-772): [#def70]
  graphviz-2.40.1/cmd/tools/unflatten.c:195: alloc_fn: Storage is returned from allocation function "openFile".
  graphviz-2.40.1/cmd/tools/unflatten.c:160:5: alloc_fn: Storage is returned from allocation function "fopen".
  graphviz-2.40.1/cmd/tools/unflatten.c:160:5: var_assign: Assigning: "fp" = "fopen(name, mode)".
  graphviz-2.40.1/cmd/tools/unflatten.c:170:5: return_alloc: Returning allocated memory "fp".
  graphviz-2.40.1/cmd/tools/unflatten.c:195: var_assign: Assigning: "outFile" = storage returned from "openFile(optarg, "w")".
  graphviz-2.40.1/cmd/tools/unflatten.c:195: overwrite_var: Overwriting "outFile" in "outFile = openFile(optarg, "w")" leaks the storage that "outFile" points to.
  #  193|         break;
  #  194|     case 'o':
  #  195|->       outFile = openFile(optarg, "w");
  #  196|         break;
  #  197|     case '?':

Related to #1464.

4 years agofix rersource leakage in sccmap
Matthew Fernandez [Sun, 13 Sep 2020 03:23:07 +0000 (20:23 -0700)]
fix rersource leakage in sccmap

This addresses the following Coverity warning:

Error: RESOURCE_LEAK (CWE-772): [#def69]
graphviz-2.40.1/cmd/tools/sccmap.c:356: alloc_fn: Storage is returned from allocation function "openFile".
graphviz-2.40.1/cmd/tools/sccmap.c:313:5: alloc_fn: Storage is returned from allocation function "fopen".
graphviz-2.40.1/cmd/tools/sccmap.c:313:5: var_assign: Assigning: "fp" = "fopen(name, mode)".
graphviz-2.40.1/cmd/tools/sccmap.c:323:5: return_alloc: Returning allocated memory "fp".
graphviz-2.40.1/cmd/tools/sccmap.c:356: var_assign: Assigning: "outfp" = storage returned from "openFile(optarg, "w")".
graphviz-2.40.1/cmd/tools/sccmap.c:356: overwrite_var: Overwriting "outfp" in "outfp = openFile(optarg, "w")" leaks the storage that "outfp" points to.

Related to #1464.

4 years agofix resource leakage in gvpack
Matthew Fernandez [Sun, 13 Sep 2020 03:20:53 +0000 (20:20 -0700)]
fix resource leakage in gvpack

This addresses the following Coverity warning:

  Error: RESOURCE_LEAK (CWE-772): [#def60]
  graphviz-2.40.1/cmd/tools/gvpack.c:239: alloc_fn: Storage is returned from allocation function "openFile".
  graphviz-2.40.1/cmd/tools/gvpack.c:124:5: alloc_fn: Storage is returned from allocation function "fopen".
  graphviz-2.40.1/cmd/tools/gvpack.c:124:5: var_assign: Assigning: "fp" = "fopen(name, mode)".
  graphviz-2.40.1/cmd/tools/gvpack.c:134:5: return_alloc: Returning allocated memory "fp".
  graphviz-2.40.1/cmd/tools/gvpack.c:239: var_assign: Assigning: "outfp" = storage returned from "openFile(optarg, "w")".
  graphviz-2.40.1/cmd/tools/gvpack.c:239: overwrite_var: Overwriting "outfp" in "outfp = openFile(optarg, "w")" leaks the storage that "outfp" points to.
  #  237|         break;
  #  238|     case 'o':
  #  239|->       outfp = openFile(optarg, "w");
  #  240|         break;
  #  241|     case 'u':

Related to #1464.

4 years agofix resource leakage in gv2gml
Matthew Fernandez [Sun, 13 Sep 2020 03:17:36 +0000 (20:17 -0700)]
fix resource leakage in gv2gml

This addresses the following Coverity warning:

  Error: RESOURCE_LEAK (CWE-772): [#def57]
  graphviz-2.40.1/cmd/tools/gv2gml.c:713: alloc_fn: Storage is returned from allocation function "openFile".
  graphviz-2.40.1/cmd/tools/gv2gml.c:666:5: alloc_fn: Storage is returned from allocation function "fopen".
  graphviz-2.40.1/cmd/tools/gv2gml.c:666:5: var_assign: Assigning: "fp" = "fopen(name, mode)".
  graphviz-2.40.1/cmd/tools/gv2gml.c:677:5: return_alloc: Returning allocated memory "fp".
  graphviz-2.40.1/cmd/tools/gv2gml.c:713: var_assign: Assigning: "outFile" = storage returned from "openFile(optarg, "w")".
  graphviz-2.40.1/cmd/tools/gv2gml.c:713: overwrite_var: Overwriting "outFile" in "outFile = openFile(optarg, "w")" leaks the storage that "outFile" points to.
  #  711|     switch (c) {
  #  712|     case 'o':
  #  713|->       outFile = openFile(optarg, "w");
  #  714|         break;
  #  715|     case ':':

Related to #1464.

4 years agofix resource leakage in graphml2gv
Matthew Fernandez [Sun, 13 Sep 2020 03:15:51 +0000 (20:15 -0700)]
fix resource leakage in graphml2gv

This addresses the following Coverity warning:

  Error: RESOURCE_LEAK (CWE-772): [#def56]
  graphviz-2.40.1/cmd/tools/graphml2gv.c:729: alloc_fn: Storage is returned from allocation function "openFile".
  graphviz-2.40.1/cmd/tools/graphml2gv.c:676:5: alloc_fn: Storage is returned from allocation function "fopen".
  graphviz-2.40.1/cmd/tools/graphml2gv.c:676:5: var_assign: Assigning: "fp" = "fopen(name, mode)".
  graphviz-2.40.1/cmd/tools/graphml2gv.c:687:5: return_alloc: Returning allocated memory "fp".
  graphviz-2.40.1/cmd/tools/graphml2gv.c:729: var_assign: Assigning: "outFile" = storage returned from "openFile(optarg, "w")".
  graphviz-2.40.1/cmd/tools/graphml2gv.c:729: overwrite_var: Overwriting "outFile" in "outFile = openFile(optarg, "w")" leaks the storage that "outFile" points to.
  #  727|         break;
  #  728|     case 'o':
  #  729|->       outFile = openFile(optarg, "w");
  #  730|         break;
  #  731|     case ':':

Related to #1464.

4 years agofix resource leakage in gml2gv
Matthew Fernandez [Sun, 13 Sep 2020 03:13:23 +0000 (20:13 -0700)]
fix resource leakage in gml2gv

This addresses the following Coverity warning:

  Error: RESOURCE_LEAK (CWE-772): [#def51]
  graphviz-2.40.1/cmd/tools/gml2gv.c:123: alloc_fn: Storage is returned from allocation function "openFile".
  graphviz-2.40.1/cmd/tools/gml2gv.c:68:5: alloc_fn: Storage is returned from allocation function "fopen".
  graphviz-2.40.1/cmd/tools/gml2gv.c:68:5: var_assign: Assigning: "fp" = "fopen(name, mode)".
  graphviz-2.40.1/cmd/tools/gml2gv.c:79:5: return_alloc: Returning allocated memory "fp".
  graphviz-2.40.1/cmd/tools/gml2gv.c:123: var_assign: Assigning: "outFile" = storage returned from "openFile(optarg, "w")".
  graphviz-2.40.1/cmd/tools/gml2gv.c:123: overwrite_var: Overwriting "outFile" in "outFile = openFile(optarg, "w")" leaks the storage that "outFile" points to.
  #  121|         break;
  #  122|     case 'o':
  #  123|->       outFile = openFile(optarg, "w");
  #  124|         break;
  #  125|     case ':':

Related to #1464.

4 years agofix resource leakage in cvtgxl
Matthew Fernandez [Sun, 13 Sep 2020 03:11:15 +0000 (20:11 -0700)]
fix resource leakage in cvtgxl

This addresses the following Coverity warning:

  Error: RESOURCE_LEAK (CWE-772): [#def50]
  graphviz-2.40.1/cmd/tools/cvtgxl.c:153: alloc_fn: Storage is returned from allocation function "openFile".
  graphviz-2.40.1/cmd/tools/cvtgxl.c:65:5: alloc_fn: Storage is returned from allocation function "fopen".
  graphviz-2.40.1/cmd/tools/cvtgxl.c:65:5: var_assign: Assigning: "fp" = "fopen(name, mode)".
  graphviz-2.40.1/cmd/tools/cvtgxl.c:76:5: return_alloc: Returning allocated memory "fp".
  graphviz-2.40.1/cmd/tools/cvtgxl.c:153: var_assign: Assigning: "outFile" = storage returned from "openFile(optarg, "w")".
  graphviz-2.40.1/cmd/tools/cvtgxl.c:153: overwrite_var: Overwriting "outFile" in "outFile = openFile(optarg, "w")" leaks the storage that "outFile" points to.
  #  151|         break;
  #  152|     case 'o':
  #  153|->       outFile = openFile(optarg, "w");
  #  154|         break;
  #  155|     case ':':

Related to #1464.

4 years agofix resource leakage in acyclic
Matthew Fernandez [Sun, 13 Sep 2020 03:08:30 +0000 (20:08 -0700)]
fix resource leakage in acyclic

This addresses the following Coverity warning:

  Error: RESOURCE_LEAK (CWE-772): [#def47]
  graphviz-2.40.1/cmd/tools/acyclic.c:151: alloc_fn: Storage is returned from allocation function "openFile".
  graphviz-2.40.1/cmd/tools/acyclic.c:129:5: alloc_fn: Storage is returned from allocation function "fopen".
  graphviz-2.40.1/cmd/tools/acyclic.c:129:5: var_assign: Assigning: "fp" = "fopen(name, mode)".
  graphviz-2.40.1/cmd/tools/acyclic.c:139:5: return_alloc: Returning allocated memory "fp".
  graphviz-2.40.1/cmd/tools/acyclic.c:151: var_assign: Assigning: "outFile" = storage returned from "openFile(optarg, "w")".
  graphviz-2.40.1/cmd/tools/acyclic.c:151: overwrite_var: Overwriting "outFile" in "outFile = openFile(optarg, "w")" leaks the storage that "outFile" points to.
  #  149|     switch (c) {
  #  150|     case 'o':
  #  151|->       outFile = openFile(optarg, "w");
  #  152|         break;
  #  153|     case 'n':

Related to #1464.

4 years agofix file handle leakage
Matthew Fernandez [Sun, 13 Sep 2020 02:14:50 +0000 (19:14 -0700)]
fix file handle leakage

This addresses the following Coverity warnings:

  Error: RESOURCE_LEAK (CWE-772): [#def30]
  graphviz-2.40.1/cmd/lefty/lefty.c:469: alloc_fn: Storage is returned from allocation function "fopen".
  graphviz-2.40.1/cmd/lefty/lefty.c:469: var_assign: Assigning: "fp" = storage returned from "fopen(argv[0], "r")".
  graphviz-2.40.1/cmd/lefty/lefty.c:464: overwrite_var: Overwriting "fp" in "fp = stdin" leaks the storage that "fp" points to.
  #  462|               usage(0);
  #  463|           else if (strcmp (argv[0], "-") == 0)
  #  464|->             fp = stdin;
  #  465|           else if (argv[0][0] == '-') {
  #  466|               fprintf (stderr, "option %s unrecognized - ignored\n", argv[0]);

  Error: RESOURCE_LEAK (CWE-772): [#def31]
  graphviz-2.40.1/cmd/lefty/lefty.c:469: alloc_fn: Storage is returned from allocation function "fopen".
  graphviz-2.40.1/cmd/lefty/lefty.c:469: var_assign: Assigning: "fp" = storage returned from "fopen(argv[0], "r")".
  graphviz-2.40.1/cmd/lefty/lefty.c:469: overwrite_var: Overwriting "fp" in "fp = fopen(argv[0], "r")" leaks the storage that "fp" points to.
  #  467|           }
  #  468|           else {
  #  469|->             if ((fp = fopen (argv[0], "r")) == NULL) {
  #  470|                   fprintf (stderr, "cannot open input file: %s\n", argv[0]);
  #  471|                   exit(2);

Related to #1464.

4 years agofix resource leak in country_graph_coloring_internal
Matthew Fernandez [Sun, 13 Sep 2020 01:34:55 +0000 (18:34 -0700)]
fix resource leak in country_graph_coloring_internal

This addresses the following Coverity warnings:

  Error: CPPCHECK_WARNING (CWE-404): [#def16]
  graphviz-2.40.1/cmd/gvmap/country_graph_coloring.c:275: error[resourceLeak]: Resource leak: fp
  #  273|       }
  #  274|     }
  #  275|-> }
  #  276|
  #  277|   void country_graph_coloring_internal(int seed, SparseMatrix A, int **p, real *norm_1, int do_swapping){

  Error: RESOURCE_LEAK (CWE-772): [#def17]
  graphviz-2.40.1/cmd/gvmap/country_graph_coloring.c:237: alloc_fn: Storage is returned from allocation function "fopen".
  graphviz-2.40.1/cmd/gvmap/country_graph_coloring.c:237: var_assign: Assigning: "fp" = storage returned from "fopen("timing_greedy", "w")".
  graphviz-2.40.1/cmd/gvmap/country_graph_coloring.c:272: noescape: Resource "fp" is not freed or pointed-to in "fprintf". [Note: The source code implementation of the function has been overridden by a builtin model.]
  graphviz-2.40.1/cmd/gvmap/country_graph_coloring.c:275: leaked_storage: Variable "fp" going out of scope leaks the storage it points to.
  #  273|       }
  #  274|     }
  #  275|-> }
  #  276|
  #  277|   void country_graph_coloring_internal(int seed, SparseMatrix A, int **p, real *norm_1, int do_swapping){

Related to #1464.

4 years agofix resource leak in edgepaint
Matthew Fernandez [Sun, 13 Sep 2020 01:32:36 +0000 (18:32 -0700)]
fix resource leak in edgepaint

This addresses the following Coverity warning:

  Error: RESOURCE_LEAK (CWE-772): [#def15]
  graphviz-2.40.1/cmd/edgepaint/edgepaintmain.c:190: alloc_fn: Storage is returned from allocation function "openFile".
  graphviz-2.40.1/cmd/edgepaint/edgepaintmain.c:59:2: alloc_fn: Storage is returned from allocation function "fopen".
  graphviz-2.40.1/cmd/edgepaint/edgepaintmain.c:59:2: var_assign: Assigning: "fp" = "fopen(name, mode)".
  graphviz-2.40.1/cmd/edgepaint/edgepaintmain.c:69:2: return_alloc: Returning allocated memory "fp".
  graphviz-2.40.1/cmd/edgepaint/edgepaintmain.c:190: var_assign: Assigning: "outfile" = storage returned from "openFile(optarg, "w", CmdName)".
  graphviz-2.40.1/cmd/edgepaint/edgepaintmain.c:190: overwrite_var: Overwriting "outfile" in "outfile = openFile(optarg, "w", CmdName)" leaks the storage that "outfile" points to.
  #  188|         break;
  #  189|       case 'o':
  #  190|->       outfile = openFile(optarg, "w", CmdName);
  #  191|         break;
  #  192|       default:

Related to #1464.

4 years agoMerge branch 'replace-rtest.sh-with-rtest.py-for-remaining-automake-targets' into...
Magnus Jacobsson [Sat, 19 Sep 2020 12:55:23 +0000 (12:55 +0000)]
Merge branch 'replace-rtest.sh-with-rtest.py-for-remaining-automake-targets' into 'master'

Replace rtest.sh with rtest.py for remaining automake targets

See merge request graphviz/graphviz!1579