]> granicus.if.org Git - graphviz/commit
dotgen: squash -Wsign-conversion warning in 'doDot'
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 8 May 2022 20:02:31 +0000 (13:02 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 25 May 2022 14:27:22 +0000 (07:27 -0700)
commitf7abf5c96c303e7d04fda9ddca0caff2851095bc
tree57691ea33749feab9785fff6a7ffd019995ce35c
parentb0aa646baa4c68095899dca7318774a19fab7860
dotgen: squash -Wsign-conversion warning in 'doDot'

The compiler says:

  dotinit.c: In function 'doDot':
  dotinit.c:454:24: warning: conversion to 'unsigned int' from 'int' may change
    the sign of the result [-Wsign-conversion]
  454 |         pinfo.margin = Pack;
      |                        ^~~~

But from the surrounding code and the implementation of `getPack`, we can
statically determine that `Pack` is non-negative at this point.
lib/dotgen/dotinit.c