diff --git a/lib/widget/input.c b/lib/widget/input.c index 0daa58351..2fd4fa587 100644 --- a/lib/widget/input.c +++ b/lib/widget/input.c @@ -85,11 +85,11 @@ static char *kill_buffer = NULL; /* --------------------------------------------------------------------------------------------- */ static size_t -get_history_length (const GList * history) +get_history_length (GList * history) { size_t len = 0; - for (; history != NULL; history = (const GList *) g_list_previous (history)) + for (; history != NULL; history = g_list_previous (history)) len++; return len; diff --git a/lib/widget/menu.c b/lib/widget/menu.c index 7ada6f954..a045e2367 100644 --- a/lib/widget/menu.c +++ b/lib/widget/menu.c @@ -718,7 +718,7 @@ menubar_get_menu_by_x_coord (const WMenuBar * menubar, int x) static gboolean menubar_mouse_on_menu (const WMenuBar * menubar, int y, int x) { - Widget *w = WIDGET (menubar); + const Widget *w = CONST_WIDGET (menubar); menu_t *menu; int left_x, right_x, bottom_y; diff --git a/src/filemanager/panel.c b/src/filemanager/panel.c index fdbabec6b..ef75fb588 100644 --- a/src/filemanager/panel.c +++ b/src/filemanager/panel.c @@ -3834,7 +3834,7 @@ panel_mouse_is_on_item (const WPanel * panel, int y, int x) { int width, lines; - width = (WIDGET (panel)->cols - 2) / panel->list_cols; + width = (CONST_WIDGET (panel)->cols - 2) / panel->list_cols; lines = panel_lines (panel); y += lines * (x / width); } diff --git a/src/vfs/sftpfs/internal.c b/src/vfs/sftpfs/internal.c index 530a48617..4eebb2547 100644 --- a/src/vfs/sftpfs/internal.c +++ b/src/vfs/sftpfs/internal.c @@ -390,6 +390,7 @@ sftpfs_symlink (const vfs_path_t * vpath1, const vfs_path_t * vpath2, GError ** sftpfs_super_t *super = NULL; const vfs_path_element_t *path_element1; const vfs_path_element_t *path_element2 = NULL; + const char *ctmp_path; char *tmp_path; unsigned int tmp_path_len; int res; @@ -397,8 +398,8 @@ sftpfs_symlink (const vfs_path_t * vpath1, const vfs_path_t * vpath2, GError ** if (!sftpfs_op_init (&super, &path_element2, vpath2, mcerror)) return -1; - tmp_path = (char *) sftpfs_fix_filename (path_element2->path, &tmp_path_len); - tmp_path = g_strndup (tmp_path, tmp_path_len); + ctmp_path = sftpfs_fix_filename (path_element2->path, &tmp_path_len); + tmp_path = g_strndup (ctmp_path, tmp_path_len); path_element1 = vfs_path_get_by_index (vpath1, -1); @@ -591,6 +592,7 @@ sftpfs_rename (const vfs_path_t * vpath1, const vfs_path_t * vpath2, GError ** m sftpfs_super_t *super = NULL; const vfs_path_element_t *path_element1; const vfs_path_element_t *path_element2 = NULL; + const char *ctmp_path; char *tmp_path; unsigned int tmp_path_len; int res; @@ -598,8 +600,8 @@ sftpfs_rename (const vfs_path_t * vpath1, const vfs_path_t * vpath2, GError ** m if (!sftpfs_op_init (&super, &path_element2, vpath2, mcerror)) return -1; - tmp_path = (char *) sftpfs_fix_filename (path_element2->path, &tmp_path_len); - tmp_path = g_strndup (tmp_path, tmp_path_len); + ctmp_path = sftpfs_fix_filename (path_element2->path, &tmp_path_len); + tmp_path = g_strndup (ctmp_path, tmp_path_len); path_element1 = vfs_path_get_by_index (vpath1, -1);