Commit 7fcdd60a authored by Hans de Goede's avatar Hans de Goede

renderer-native: Fix compiler warning

Fix the following compiler warning:
../src/backends/native/meta-renderer-native.c: In function ‘meta_renderer_native_create_view’:
/usr/include/glib-2.0/glib/gmacros.h:523:17: warning: ‘formats’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  523 |     { if (_ptr) (cleanup) ((ParentName *) _ptr); }                                                              \
      |                 ^
../src/backends/native/meta-renderer-native.c:773:22: note: ‘formats’ was declared here
  773 |   g_autoptr (GArray) formats;
      |                      ^~~~~~~

GNOME/mutter!632
parent a8984a81
......@@ -770,7 +770,7 @@ pick_secondary_gpu_framebuffer_format_for_cpu (CoglOnscreen *onscreen,
/* The rest are other fairly commonly used formats in OpenGL. */
DRM_FORMAT_XRGB8888,
};
g_autoptr (GArray) formats;
g_autoptr (GArray) formats = NULL;
size_t k;
unsigned int i;
uint32_t drm_format;
......
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