Warnings cleanup in ps surfaces

Bryce Harrington <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <[email protected]>
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
-- 
cairo mailing list
[email protected]
https://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.