Commit 7d070ca0 authored by Marius Vlad's avatar Marius Vlad

Fix compiler warnings generated by older toolchains/compiler

This fixes warnings like ``may be used uninitialized''

libweston/compositor-drm.c: In function 'drm_device_is_kms':
libweston/compositor-drm.c:6374:12: warning: 'id' may be used uninitialized in this function [-Wmaybe-uninitialized]
  b->drm.id = id;
Signed-off-by: Marius Vlad's avatarMarius Vlad <marius.vlad0@gmail.com>
parent bc315aa2
......@@ -2610,7 +2610,7 @@ recompute_selection(struct terminal *terminal)
int side_margin, top_margin;
int start_x, end_x;
int cw, ch;
union utf8_char *data;
union utf8_char *data = NULL;
cw = terminal->average_width;
ch = terminal->extents.height;
......
......@@ -6680,7 +6680,7 @@ drm_device_is_kms(struct drm_backend *b, struct udev_device *device)
const char *filename = udev_device_get_devnode(device);
const char *sysnum = udev_device_get_sysnum(device);
drmModeRes *res;
int id, fd;
int id = -1, fd;
if (!filename)
return false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment