Merge branch 'fix-static-analysis'
This commit is contained in:
commit
78721065e0
|
@ -59,7 +59,6 @@ int ipc_recv_message(int sockfd, uint32_t message_type,
|
||||||
fprintf(stderr, "IPC: unexpected reply type (got %d, expected %d)\n", *((uint32_t*)walk), message_type);
|
fprintf(stderr, "IPC: unexpected reply type (got %d, expected %d)\n", *((uint32_t*)walk), message_type);
|
||||||
return -2;
|
return -2;
|
||||||
}
|
}
|
||||||
walk += sizeof(uint32_t);
|
|
||||||
|
|
||||||
*reply = smalloc(*reply_length);
|
*reply = smalloc(*reply_length);
|
||||||
|
|
||||||
|
|
15
src/main.c
15
src/main.c
|
@ -270,7 +270,6 @@ int main(int argc, char *argv[]) {
|
||||||
{0, 0, 0, 0}
|
{0, 0, 0, 0}
|
||||||
};
|
};
|
||||||
int option_index = 0, opt;
|
int option_index = 0, opt;
|
||||||
xcb_void_cookie_t colormap_cookie;
|
|
||||||
|
|
||||||
setlocale(LC_ALL, "");
|
setlocale(LC_ALL, "");
|
||||||
|
|
||||||
|
@ -541,20 +540,6 @@ int main(int argc, char *argv[]) {
|
||||||
cookie = xcb_change_window_attributes_checked(conn, root, mask, values);
|
cookie = xcb_change_window_attributes_checked(conn, root, mask, values);
|
||||||
check_error(conn, cookie, "Another window manager seems to be running");
|
check_error(conn, cookie, "Another window manager seems to be running");
|
||||||
|
|
||||||
/* By now we already checked for replies once, so let’s see if colormap
|
|
||||||
* creation worked (if requested). */
|
|
||||||
if (colormap != root_screen->default_colormap) {
|
|
||||||
xcb_generic_error_t *error = xcb_request_check(conn, colormap_cookie);
|
|
||||||
if (error != NULL) {
|
|
||||||
ELOG("Could not create ColorMap for 32 bit visual, falling back to X11 default.\n");
|
|
||||||
root_depth = root_screen->root_depth;
|
|
||||||
visual_id = root_screen->root_visual;
|
|
||||||
colormap = root_screen->default_colormap;
|
|
||||||
DLOG("root_depth = %d, visual_id = 0x%08x.\n", root_depth, visual_id);
|
|
||||||
free(error);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
xcb_get_geometry_reply_t *greply = xcb_get_geometry_reply(conn, gcookie, NULL);
|
xcb_get_geometry_reply_t *greply = xcb_get_geometry_reply(conn, gcookie, NULL);
|
||||||
if (greply == NULL) {
|
if (greply == NULL) {
|
||||||
ELOG("Could not get geometry of the root window, exiting\n");
|
ELOG("Could not get geometry of the root window, exiting\n");
|
||||||
|
|
|
@ -303,7 +303,7 @@ static void workspace_reassign_sticky(Con *con) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void _workspace_show(Con *workspace, bool changed_num_workspaces) {
|
static void _workspace_show(Con *workspace) {
|
||||||
Con *current, *old = NULL;
|
Con *current, *old = NULL;
|
||||||
|
|
||||||
/* safe-guard against showing i3-internal workspaces like __i3_scratch */
|
/* safe-guard against showing i3-internal workspaces like __i3_scratch */
|
||||||
|
@ -347,7 +347,6 @@ static void _workspace_show(Con *workspace, bool changed_num_workspaces) {
|
||||||
LOG("Closing old workspace (%p / %s), it is empty\n", old, old->name);
|
LOG("Closing old workspace (%p / %s), it is empty\n", old, old->name);
|
||||||
tree_close(old, DONT_KILL_WINDOW, false, false);
|
tree_close(old, DONT_KILL_WINDOW, false, false);
|
||||||
ipc_send_event("workspace", I3_IPC_EVENT_WORKSPACE, "{\"change\":\"empty\"}");
|
ipc_send_event("workspace", I3_IPC_EVENT_WORKSPACE, "{\"change\":\"empty\"}");
|
||||||
changed_num_workspaces = true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -375,7 +374,7 @@ static void _workspace_show(Con *workspace, bool changed_num_workspaces) {
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void workspace_show(Con *workspace) {
|
void workspace_show(Con *workspace) {
|
||||||
_workspace_show(workspace, false);
|
_workspace_show(workspace);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -386,7 +385,7 @@ void workspace_show_by_name(const char *num) {
|
||||||
Con *workspace;
|
Con *workspace;
|
||||||
bool changed_num_workspaces;
|
bool changed_num_workspaces;
|
||||||
workspace = workspace_get(num, &changed_num_workspaces);
|
workspace = workspace_get(num, &changed_num_workspaces);
|
||||||
_workspace_show(workspace, changed_num_workspaces);
|
_workspace_show(workspace);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue