[cairo] Warnings cleanup in ps surfaces

Bryce Harrington bryce at osg.samsung.com
Thu Dec 7 22:26:45 UTC 2017


Hi Adrian,

I'm making a pass through the distcheck issues to prep for another devel
snapshot.  There's just two warnings, having to do with potential
uninitialized values in the ps surface code:

../../../src/cairo-ps-surface.c: In function
‘_cairo_ps_surface_emit_surface’:
../../../src/cairo-ps-surface.c:3709:2: warning: ‘old_stream’ may be
used uninitialized in this function [-Wmaybe-uninitialized]
  _cairo_pdf_operators_set_stream (&surface->pdf_operators,
  ^
../../../src/cairo-ps-surface.c:3587:5: warning: ‘ps_form’ may be used
uninitialized in this function [-Wmaybe-uninitialized]
     _cairo_output_stream_printf (surface->stream,
     ^
../../../src/cairo-ps-surface.c:3573:22: note: ‘ps_form’ was declared
here
     cairo_ps_form_t *ps_form;

Would it be sufficient to just initialize both these to NULL, or would
that possibly introduce some other error (or paper over a logic flaw)?

Bryce


More information about the cairo mailing list