]> granicus.if.org Git - graphviz/commit
cgraph: go through 'uintptr_t' when casting between pointers as IDs
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 20 Nov 2021 06:23:45 +0000 (22:23 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 24 Nov 2021 15:47:40 +0000 (07:47 -0800)
commitd6d88138bbe9bd9fade7cc61a5ec31197c714ef7
tree61911b4e5f8531b2e5d4cd04cbd6c80c0914af63
parentd67cee19fefeae38e5e3c89cde369b76c0c2166f
cgraph: go through 'uintptr_t' when casting between pointers as IDs

The type `IDTYPE` is `uint64_t` which is wide enough to contain a pointer on all
supported platforms. However, on 32-bit platforms the compiler throws
-Wpointer-to-int-cast about this kind of back-and-forth shuffling. Going through
`uintptr_t` (or `intptr_t`) silences these.
lib/cgraph/id.c