mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-05-16 11:31:15 +00:00
[client] egl: fix gcc false maybe-uninitialized
positives
This commit is contained in:
parent
63ec2dc01b
commit
28024de314
@ -248,7 +248,7 @@ bool egl_desktop_render(EGL_Desktop * desktop, const float x, const float y,
|
|||||||
if (!desktop->shader)
|
if (!desktop->shader)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
int scaleAlgo;
|
int scaleAlgo = LG_SCALE_NEAREST;
|
||||||
|
|
||||||
switch (scaleType)
|
switch (scaleType)
|
||||||
{
|
{
|
||||||
|
@ -223,13 +223,12 @@ bool egl_create(void ** opaque, const LG_RendererParams params, bool * needsOpen
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
// create our local storage
|
// create our local storage
|
||||||
*opaque = malloc(sizeof(struct Inst));
|
*opaque = calloc(1, sizeof(struct Inst));
|
||||||
if (!*opaque)
|
if (!*opaque)
|
||||||
{
|
{
|
||||||
DEBUG_INFO("Failed to allocate %lu bytes", sizeof(struct Inst));
|
DEBUG_INFO("Failed to allocate %lu bytes", sizeof(struct Inst));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
memset(*opaque, 0, sizeof(struct Inst));
|
|
||||||
|
|
||||||
// safe off parameteres and init our default option values
|
// safe off parameteres and init our default option values
|
||||||
struct Inst * this = (struct Inst *)*opaque;
|
struct Inst * this = (struct Inst *)*opaque;
|
||||||
@ -402,7 +401,7 @@ static void egl_calc_mouse_state(struct Inst * this)
|
|||||||
|
|
||||||
static void egl_update_scale_type(struct Inst * this)
|
static void egl_update_scale_type(struct Inst * this)
|
||||||
{
|
{
|
||||||
int width, height;
|
int width = 0, height = 0;
|
||||||
|
|
||||||
switch (this->rotate)
|
switch (this->rotate)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user