fix: maybe-uninitialized error

This commit is contained in:
William McKinnon 2023-05-20 17:03:20 -04:00
parent 415e072a3a
commit d2ad352c7f

View file

@ -343,7 +343,7 @@ static void ipc_json_describe_enabled_output(struct sway_output *output,
json_object_object_add(layer, "namespace",
json_object_new_string(lsurface->layer_surface->namespace));
char *layer_name;
char *layer_name = NULL;
switch (lsurface->layer) {
case ZWLR_LAYER_SHELL_V1_LAYER_BACKGROUND:
layer_name = "background";