mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-31 07:00:27 +01:00
st/vega: fix uninitialized values
C still treats array arguments exactly like pointer arguments.
By sheer coincidence, this still worked fine on 64-bit
machines where 2 * sizeof(float) == sizeof(void*), but not
on 32-bit.
Noticed by clang:
text.c:76:51: warning: sizeof on array function parameter will
return size of 'const VGfloat *' (aka 'const float *') instead of
'const VGfloat [2]' [-Wsizeof-array-argument]
memcpy(glyph->glyph_origin, glyphOrigin, sizeof(glyphOrigin));
NOTE: This is a candidate for the 8.0 branch.
Reviewed-by: Brian Paul <brianp@vmware.com>
(cherry picked from commit 6a491b5728)
This commit is contained in:
parent
4dd228a0a9
commit
fca35d2e5e
1 changed files with 2 additions and 2 deletions
|
|
@ -73,8 +73,8 @@ static void add_glyph(struct vg_font *font,
|
|||
glyph = CALLOC_STRUCT(vg_glyph);
|
||||
glyph->object = obj;
|
||||
glyph->is_hinted = isHinted;
|
||||
memcpy(glyph->glyph_origin, glyphOrigin, sizeof(glyphOrigin));
|
||||
memcpy(glyph->escapement, escapement, sizeof(escapement));
|
||||
memcpy(glyph->glyph_origin, glyphOrigin, sizeof(glyph->glyph_origin));
|
||||
memcpy(glyph->escapement, escapement, sizeof(glyph->glyph_origin));
|
||||
|
||||
cso_hash_insert(font->glyphs, (unsigned) glyphIndex, glyph);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue