Tracking down warnings, old news to some of you

Although there are close to 5000 warnings when I build graphviz on this Mac, the good news is many do not look that serious.

I grepped and counted some obvious types of warnings

conversion:                   3101
unused:                        660
const:                         422
cast:                          377
comparing floating point:      261
shadows:                       112
missing field:                 111
Cellar:                        100
missing-prototypes:             89
comparison:                     52
is not defined, evaluates to 0: 24
volatile:                       12

It could be worse, right?

Cellar means some include file from Homebrew, not our code.

Besides these, there are 20 warnings left. There some mixing of uint64_t and long in formatting. There’s some incompatible function pointers to code that calls GLU, and some other problems. There are only one or two that look actually scary.

Anyway, I thought you might like to know.

../../lib/expr/exparse.y: warning: 4 shift/reduce conflicts [-Wconflicts-sr]
../../lib/common/htmlparse.y: warning: 2 shift/reduce conflicts [-Wconflicts-sr]
gvrender_lasi.cpp:354:10: warning: 5 enumeration values not handled in switch: 'PANGO_WEIGHT_THIN', 'PANGO_WEIGHT_SEMILIGHT', 'PANGO_WEIGHT_BOOK'... [-Wswitch]
gvtextlayout_pango.c:152:17: warning: 'pango_fc_font_lock_face' is deprecated: Use 'pango_font_get_hb_font' instead [-Wdeprecated-declarations]
gvtextlayout_pango.c:171:10: warning: 'pango_fc_font_unlock_face' is deprecated: Use 'pango_font_get_hb_font' instead [-Wdeprecated-declarations]
gvloadimage_rsvg.c:33:5: warning: 'rsvg_handle_close' is deprecated: Use 'rsvg_handle_read_stream_sync' instead [-Wdeprecated-declarations]
gvloadimage_rsvg.c:132:7: warning: 'rsvg_handle_write' is deprecated: Use 'rsvg_handle_read_stream_sync' instead [-Wdeprecated-declarations]
gvloadimage_rsvg.c:152:3: warning: 'rsvg_handle_close' is deprecated: Use 'rsvg_handle_read_stream_sync' instead [-Wdeprecated-declarations]
gv2gml.c:421:66: warning: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat]
gv2gml.c:600:49: warning: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat]
gv2gml.c:601:43: warning: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat]
gv2gml.c:602:43: warning: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat]
dotlex.c:50:20: warning: all paths through this function will call itself [-Winfinite-recursion]
polytess.c:47:44: warning: incompatible function pointer types passing 'void (*)(GLvoid *)' (aka 'void (*)(void *)') to parameter of type '_GLUfuncptr' (aka 'void (*)(void)') [-Wincompatible-function-pointer-types]
polytess.c:48:43: warning: incompatible function pointer types passing 'void (*)(GLenum)' (aka 'void (*)(unsigned int)') to parameter of type '_GLUfuncptr' (aka 'void (*)(void)') [-Wincompatible-function-pointer-types]
polytess.c:50:44: warning: incompatible function pointer types passing 'void (*)(GLdouble *, GLdouble **, GLfloat *, GLdouble **)' (aka 'void (*)(double *, double **, float *, double **)') to parameter of type '_GLUfuncptr' (aka 'void (*)(void)') [-Wincompatible-function-pointer-types]
topviewfuncs.c:165:13: warning: variable 'vis' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
topviewfuncs.c:276:21: warning: if statement has empty body [-Wempty-body]
tvnodes.c:354:18: warning: too many arguments in call to 'initGrid'
gui/menucallbacks.c:86:46: warning: if statement has empty body [-Wempty-body]

Yes, I’ve been slowly paying them down, but a long way to go. @magjac setup Gitlab metrics to monitor this a while ago. So e.g. on this MR you can expand the metrics and see it decreased the macOS Autotools warnings by 4: -Wfloat-equal based clean up (!2138) · Merge requests · graphviz / graphviz · GitLab

Fixes for the easy cases: fix some of Stephen's posted warnings (!2151) · Merge requests · graphviz / graphviz · GitLab