mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice-common
synced 2026-01-08 04:05:54 +00:00
miLineArc(): initialize edge1, edge2
When compiling spice-common with meson/ninja under "release" mode, I get
several compiler warnings about possibly-uninitialized members. For
example:
../subprojects/spice-common/common/lines.c: In function ‘miLineArc’:
../subprojects/spice-common/common/lines.c:2167:17: error: ‘edge2.dx’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
edge->e += edge->dx; \
^~
../subprojects/spice-common/common/lines.c:2426:24: note: ‘edge2.dx’ was declared here
PolyEdgeRec edge1, edge2;
^~~~~
Initializing these structures to zero silences the warnings.
Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
This commit is contained in:
parent
754cd54e1a
commit
fc46379b37
@ -2423,7 +2423,7 @@ miLineArc (GCPtr pGC,
|
||||
int xorgi = 0, yorgi = 0;
|
||||
Spans spanRec;
|
||||
int n;
|
||||
PolyEdgeRec edge1, edge2;
|
||||
PolyEdgeRec edge1 = { 0 }, edge2 = { 0 };
|
||||
int edgey1, edgey2;
|
||||
Boolean edgeleft1, edgeleft2;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user