cppcheck: Cleanup Passing NULL after the last typed argument warning

Cleanup Passing NULL after the last typed argument warning.

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andreas Mohr 2016-03-25 18:33:44 +00:00 committed by Andrew Borodin
parent 5a7d7d0087
commit eef076cef6
28 changed files with 125 additions and 104 deletions

View File

@ -153,7 +153,7 @@ mc_config_init_one_config_path (const char *path_base, const char *subdir, GErro
mc_return_val_if_error (mcerror, FALSE); mc_return_val_if_error (mcerror, FALSE);
full_path = g_build_filename (path_base, subdir, NULL); full_path = g_build_filename (path_base, subdir, (char *) NULL);
if (g_file_test (full_path, G_FILE_TEST_EXISTS)) if (g_file_test (full_path, G_FILE_TEST_EXISTS))
{ {
if (g_file_test (full_path, G_FILE_TEST_IS_DIR)) if (g_file_test (full_path, G_FILE_TEST_IS_DIR))
@ -179,7 +179,7 @@ mc_config_init_one_config_path (const char *path_base, const char *subdir, GErro
static char * static char *
mc_config_get_deprecated_path (void) mc_config_get_deprecated_path (void)
{ {
return g_build_filename (mc_config_get_home_dir (), MC_OLD_USERCONF_DIR, NULL); return g_build_filename (mc_config_get_home_dir (), MC_OLD_USERCONF_DIR, (char *) NULL);
} }
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
@ -224,8 +224,8 @@ mc_config_copy (const char *old_name, const char *new_name, GError ** mcerror)
{ {
char *old_name2, *new_name2; char *old_name2, *new_name2;
old_name2 = g_build_filename (old_name, dir_name, NULL); old_name2 = g_build_filename (old_name, dir_name, (char *) NULL);
new_name2 = g_build_filename (new_name, dir_name, NULL); new_name2 = g_build_filename (new_name, dir_name, (char *) NULL);
mc_config_copy (old_name2, new_name2, mcerror); mc_config_copy (old_name2, new_name2, mcerror);
g_free (new_name2); g_free (new_name2);
g_free (old_name2); g_free (old_name2);
@ -247,7 +247,7 @@ mc_config_fix_migrated_rules (void)
old_name = old_name =
g_build_filename (*mc_config_migrate_rules_fix[rule_index].old_basedir, g_build_filename (*mc_config_migrate_rules_fix[rule_index].old_basedir,
mc_config_migrate_rules_fix[rule_index].filename, NULL); mc_config_migrate_rules_fix[rule_index].filename, (char *) NULL);
if (g_file_test (old_name, G_FILE_TEST_EXISTS)) if (g_file_test (old_name, G_FILE_TEST_EXISTS))
{ {
@ -255,7 +255,7 @@ mc_config_fix_migrated_rules (void)
const char *basedir = *mc_config_migrate_rules_fix[rule_index].new_basedir; const char *basedir = *mc_config_migrate_rules_fix[rule_index].new_basedir;
const char *filename = mc_config_migrate_rules_fix[rule_index].filename; const char *filename = mc_config_migrate_rules_fix[rule_index].filename;
new_name = g_build_filename (basedir, filename, NULL); new_name = g_build_filename (basedir, filename, (char *) NULL);
rename (old_name, new_name); rename (old_name, new_name);
g_free (new_name); g_free (new_name);
} }
@ -469,7 +469,8 @@ mc_config_migrate_from_old_place (GError ** mcerror, char **msg)
continue; continue;
old_name = old_name =
g_build_filename (old_dir, mc_config_files_reference[rule_index].old_filename, NULL); g_build_filename (old_dir, mc_config_files_reference[rule_index].old_filename,
(char *) NULL);
if (g_file_test (old_name, G_FILE_TEST_EXISTS)) if (g_file_test (old_name, G_FILE_TEST_EXISTS))
{ {
@ -477,7 +478,7 @@ mc_config_migrate_from_old_place (GError ** mcerror, char **msg)
const char *basedir = *mc_config_files_reference[rule_index].new_basedir; const char *basedir = *mc_config_files_reference[rule_index].new_basedir;
const char *filename = mc_config_files_reference[rule_index].new_filename; const char *filename = mc_config_files_reference[rule_index].new_filename;
new_name = g_build_filename (basedir, filename, NULL); new_name = g_build_filename (basedir, filename, (char *) NULL);
mc_config_copy (old_name, new_name, mcerror); mc_config_copy (old_name, new_name, mcerror);
g_free (new_name); g_free (new_name);
} }
@ -524,7 +525,8 @@ mc_config_get_full_path (const char *config_name)
if (strcmp (config_name, mc_config_files_reference[rule_index].new_filename) == 0) if (strcmp (config_name, mc_config_files_reference[rule_index].new_filename) == 0)
{ {
return g_build_filename (*mc_config_files_reference[rule_index].new_basedir, return g_build_filename (*mc_config_files_reference[rule_index].new_basedir,
mc_config_files_reference[rule_index].new_filename, NULL); mc_config_files_reference[rule_index].new_filename,
(char *) NULL);
} }
} }
return NULL; return NULL;

View File

@ -101,7 +101,7 @@ mc_skin_ini_file_load_search_in_dir (mc_skin_t * mc_skin, const gchar * base_dir
{ {
char *file_name, *file_name2; char *file_name, *file_name2;
file_name = g_build_filename (base_dir, MC_SKINS_SUBDIR, mc_skin->name, NULL); file_name = g_build_filename (base_dir, MC_SKINS_SUBDIR, mc_skin->name, (char *) NULL);
if (exist_file (file_name)) if (exist_file (file_name))
{ {
mc_skin->config = mc_config_init (file_name, TRUE); mc_skin->config = mc_config_init (file_name, TRUE);
@ -111,7 +111,7 @@ mc_skin_ini_file_load_search_in_dir (mc_skin_t * mc_skin, const gchar * base_dir
g_free (file_name); g_free (file_name);
file_name2 = g_strdup_printf ("%s.ini", mc_skin->name); file_name2 = g_strdup_printf ("%s.ini", mc_skin->name);
file_name = g_build_filename (base_dir, MC_SKINS_SUBDIR, file_name2, NULL); file_name = g_build_filename (base_dir, MC_SKINS_SUBDIR, file_name2, (char *) NULL);
g_free (file_name2); g_free (file_name2);
if (exist_file (file_name)) if (exist_file (file_name))

View File

@ -152,14 +152,14 @@ vfs_canon (const char *path)
encoding prefix placed at start of string without the leading slash encoding prefix placed at start of string without the leading slash
should be autofixed by adding the leading slash should be autofixed by adding the leading slash
*/ */
local = mc_build_filename (PATH_SEP_STR, path, NULL); local = mc_build_filename (PATH_SEP_STR, path, (char *) NULL);
} }
else else
{ {
const char *curr_dir; const char *curr_dir;
curr_dir = vfs_get_current_dir (); curr_dir = vfs_get_current_dir ();
local = mc_build_filename (curr_dir, path, NULL); local = mc_build_filename (curr_dir, path, (char *) NULL);
} }
result = vfs_canon (local); result = vfs_canon (local);
g_free (local); g_free (local);
@ -1272,7 +1272,7 @@ vfs_path_append_new (const vfs_path_t * vpath, const char *first_element, ...)
va_end (args); va_end (args);
result_str = vfs_path_as_str (vpath); result_str = vfs_path_as_str (vpath);
ret_vpath = vfs_path_build_filename (result_str, str_path, NULL); ret_vpath = vfs_path_build_filename (result_str, str_path, (char *) NULL);
g_free (str_path); g_free (str_path);
return ret_vpath; return ret_vpath;

View File

@ -223,7 +223,7 @@ input_history_strip_password (char *url)
return g_strdup (url); return g_strdup (url);
*colon = '\0'; *colon = '\0';
return g_strconcat (url, at, NULL); return g_strconcat (url, at, (char *) NULL);
} }
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */

View File

@ -649,7 +649,7 @@ command_completion_function (const char *_text, int state, input_complete_t flag
if (cur_path >= path_end) if (cur_path >= path_end)
break; break;
expanded = tilde_expand (*cur_path ? cur_path : "."); expanded = tilde_expand (*cur_path ? cur_path : ".");
cur_word = mc_build_filename (expanded, text, NULL); cur_word = mc_build_filename (expanded, text, (char *) NULL);
g_free (expanded); g_free (expanded);
canonicalize_pathname (cur_word); canonicalize_pathname (cur_word);
cur_path = strchr (cur_path, 0) + 1; cur_path = strchr (cur_path, 0) + 1;
@ -943,7 +943,7 @@ try_complete_all_possible (try_complete_automation_state_t * state, char *text,
*s = '\0'; *s = '\0';
if (*cdpath != '\0') if (*cdpath != '\0')
{ {
state->r = mc_build_filename (cdpath, state->word, NULL); state->r = mc_build_filename (cdpath, state->word, (char *) NULL);
SHOW_C_CTX ("try_complete:filename_subst_2"); SHOW_C_CTX ("try_complete:filename_subst_2");
matches = matches =
completion_matches (state->r, filename_completion_function, completion_matches (state->r, filename_completion_function,

View File

@ -209,7 +209,7 @@ handle_console_linux (console_action_t action)
char *mc_conssaver; char *mc_conssaver;
/* Exec the console save/restore handler */ /* Exec the console save/restore handler */
mc_conssaver = mc_build_filename (SAVERDIR, "cons.saver", NULL); mc_conssaver = mc_build_filename (SAVERDIR, "cons.saver", (char *) NULL);
execl (mc_conssaver, "cons.saver", tty_name, (char *) NULL); execl (mc_conssaver, "cons.saver", tty_name, (char *) NULL);
} }
/* Console is not a tty or execl() failed */ /* Console is not a tty or execl() failed */

View File

@ -3542,7 +3542,8 @@ dview_diff_cmd (const void *f0, const void *f1)
const WPanel *panel0 = (const WPanel *) f0; const WPanel *panel0 = (const WPanel *) f0;
const WPanel *panel1 = (const WPanel *) f1; const WPanel *panel1 = (const WPanel *) f1;
file0 = vfs_path_append_new (panel0->cwd_vpath, selection (panel0)->fname, NULL); file0 =
vfs_path_append_new (panel0->cwd_vpath, selection (panel0)->fname, (char *) NULL);
is_dir0 = S_ISDIR (selection (panel0)->st.st_mode); is_dir0 = S_ISDIR (selection (panel0)->st.st_mode);
if (is_dir0) if (is_dir0)
{ {
@ -3551,7 +3552,8 @@ dview_diff_cmd (const void *f0, const void *f1)
goto ret; goto ret;
} }
file1 = vfs_path_append_new (panel1->cwd_vpath, selection (panel1)->fname, NULL); file1 =
vfs_path_append_new (panel1->cwd_vpath, selection (panel1)->fname, (char *) NULL);
is_dir1 = S_ISDIR (selection (panel1)->st.st_mode); is_dir1 = S_ISDIR (selection (panel1)->st.st_mode);
if (is_dir1) if (is_dir1)
{ {

View File

@ -280,7 +280,7 @@ edit_save_file (WEdit * edit, const vfs_path_t * filename_vpath)
savedir = g_strdup ("."); savedir = g_strdup (".");
/* Token-related function never return leading slash, so we need add it manually */ /* Token-related function never return leading slash, so we need add it manually */
saveprefix = mc_build_filename (PATH_SEP_STR, savedir, "cooledit", NULL); saveprefix = mc_build_filename (PATH_SEP_STR, savedir, "cooledit", (char *) NULL);
g_free (savedir); g_free (savedir);
fd = mc_mkstemps (&savename_vpath, saveprefix, NULL); fd = mc_mkstemps (&savename_vpath, saveprefix, NULL);
g_free (saveprefix); g_free (saveprefix);
@ -2179,11 +2179,13 @@ edit_load_menu_file (WDialog * h)
_("Which menu file do you want to edit?"), D_NORMAL, _("Which menu file do you want to edit?"), D_NORMAL,
geteuid () != 0 ? 2 : 3, _("&Local"), _("&User"), _("&System wide")); geteuid () != 0 ? 2 : 3, _("&Local"), _("&User"), _("&System wide"));
menufile_vpath = vfs_path_build_filename (mc_global.sysconfig_dir, EDIT_GLOBAL_MENU, NULL); menufile_vpath =
vfs_path_build_filename (mc_global.sysconfig_dir, EDIT_GLOBAL_MENU, (char *) NULL);
if (!exist_file (vfs_path_get_last_path_str (menufile_vpath))) if (!exist_file (vfs_path_get_last_path_str (menufile_vpath)))
{ {
vfs_path_free (menufile_vpath); vfs_path_free (menufile_vpath);
menufile_vpath = vfs_path_build_filename (mc_global.share_data_dir, EDIT_GLOBAL_MENU, NULL); menufile_vpath =
vfs_path_build_filename (mc_global.share_data_dir, EDIT_GLOBAL_MENU, (char *) NULL);
} }
switch (dir) switch (dir)
@ -2200,12 +2202,13 @@ edit_load_menu_file (WDialog * h)
break; break;
case 2: case 2:
buffer_vpath = vfs_path_build_filename (mc_global.sysconfig_dir, EDIT_GLOBAL_MENU, NULL); buffer_vpath =
vfs_path_build_filename (mc_global.sysconfig_dir, EDIT_GLOBAL_MENU, (char *) NULL);
if (!exist_file (vfs_path_get_last_path_str (buffer_vpath))) if (!exist_file (vfs_path_get_last_path_str (buffer_vpath)))
{ {
vfs_path_free (buffer_vpath); vfs_path_free (buffer_vpath);
buffer_vpath = buffer_vpath =
vfs_path_build_filename (mc_global.share_data_dir, EDIT_GLOBAL_MENU, NULL); vfs_path_build_filename (mc_global.share_data_dir, EDIT_GLOBAL_MENU, (char *) NULL);
} }
break; break;

View File

@ -1207,15 +1207,15 @@ edit_files (const GList * files)
{ {
char *dir; char *dir;
dir = mc_build_filename (mc_config_get_cache_path (), EDIT_DIR, NULL); dir = mc_build_filename (mc_config_get_cache_path (), EDIT_DIR, (char *) NULL);
made_directory = (mkdir (dir, 0700) != -1 || errno == EEXIST); made_directory = (mkdir (dir, 0700) != -1 || errno == EEXIST);
g_free (dir); g_free (dir);
dir = mc_build_filename (mc_config_get_path (), EDIT_DIR, NULL); dir = mc_build_filename (mc_config_get_path (), EDIT_DIR, (char *) NULL);
made_directory = (mkdir (dir, 0700) != -1 || errno == EEXIST); made_directory = (mkdir (dir, 0700) != -1 || errno == EEXIST);
g_free (dir); g_free (dir);
dir = mc_build_filename (mc_config_get_data_path (), EDIT_DIR, NULL); dir = mc_build_filename (mc_config_get_data_path (), EDIT_DIR, (char *) NULL);
made_directory = (mkdir (dir, 0700) != -1 || errno == EEXIST); made_directory = (mkdir (dir, 0700) != -1 || errno == EEXIST);
g_free (dir); g_free (dir);
} }

View File

@ -332,8 +332,8 @@ compare_dir (WPanel * panel, WPanel * other, enum CompareMode mode)
{ {
vfs_path_t *src_name, *dst_name; vfs_path_t *src_name, *dst_name;
src_name = vfs_path_append_new (panel->cwd_vpath, source->fname, NULL); src_name = vfs_path_append_new (panel->cwd_vpath, source->fname, (char *) NULL);
dst_name = vfs_path_append_new (other->cwd_vpath, target->fname, NULL); dst_name = vfs_path_append_new (other->cwd_vpath, target->fname, (char *) NULL);
if (compare_files (src_name, dst_name, source->st.st_size)) if (compare_files (src_name, dst_name, source->st.st_size))
do_file_mark (panel, i, 1); do_file_mark (panel, i, 1);
vfs_path_free (src_name); vfs_path_free (src_name);
@ -370,10 +370,10 @@ do_link (link_type_t link_type, const char *fname)
/* suggest the full path for symlink, and either the full or /* suggest the full path for symlink, and either the full or
relative path to the file it points to */ relative path to the file it points to */
s = vfs_path_append_new (current_panel->cwd_vpath, fname, NULL); s = vfs_path_append_new (current_panel->cwd_vpath, fname, (char *) NULL);
if (get_other_type () == view_listing) if (get_other_type () == view_listing)
d = vfs_path_append_new (other_panel->cwd_vpath, fname, NULL); d = vfs_path_append_new (other_panel->cwd_vpath, fname, (char *) NULL);
else else
d = vfs_path_from_str (fname); d = vfs_path_from_str (fname);
@ -874,7 +874,7 @@ mkdir_cmd (void)
if (dir[0] == '\\' && dir[1] == '~') if (dir[0] == '\\' && dir[1] == '~')
tmpdir = dir + 1; tmpdir = dir + 1;
absdir = vfs_path_append_new (current_panel->cwd_vpath, tmpdir, NULL); absdir = vfs_path_append_new (current_panel->cwd_vpath, tmpdir, (char *) NULL);
} }
save_cwds_stat (); save_cwds_stat ();
@ -975,7 +975,7 @@ ext_cmd (void)
_("Which extension file you want to edit?"), D_NORMAL, 2, _("Which extension file you want to edit?"), D_NORMAL, 2,
_("&User"), _("&System Wide")); _("&User"), _("&System Wide"));
} }
extdir_vpath = vfs_path_build_filename (mc_global.sysconfig_dir, MC_LIB_EXT, NULL); extdir_vpath = vfs_path_build_filename (mc_global.sysconfig_dir, MC_LIB_EXT, (char *) NULL);
if (dir == 0) if (dir == 0)
{ {
@ -991,7 +991,8 @@ ext_cmd (void)
if (!exist_file (vfs_path_get_last_path_str (extdir_vpath))) if (!exist_file (vfs_path_get_last_path_str (extdir_vpath)))
{ {
vfs_path_free (extdir_vpath); vfs_path_free (extdir_vpath);
extdir_vpath = vfs_path_build_filename (mc_global.share_data_dir, MC_LIB_EXT, NULL); extdir_vpath =
vfs_path_build_filename (mc_global.share_data_dir, MC_LIB_EXT, (char *) NULL);
} }
do_edit (extdir_vpath); do_edit (extdir_vpath);
} }
@ -1014,12 +1015,14 @@ edit_mc_menu_cmd (void)
_("Which menu file do you want to edit?"), _("Which menu file do you want to edit?"),
D_NORMAL, geteuid ()? 2 : 3, _("&Local"), _("&User"), _("&System Wide")); D_NORMAL, geteuid ()? 2 : 3, _("&Local"), _("&User"), _("&System Wide"));
menufile_vpath = vfs_path_build_filename (mc_global.sysconfig_dir, MC_GLOBAL_MENU, NULL); menufile_vpath =
vfs_path_build_filename (mc_global.sysconfig_dir, MC_GLOBAL_MENU, (char *) NULL);
if (!exist_file (vfs_path_get_last_path_str (menufile_vpath))) if (!exist_file (vfs_path_get_last_path_str (menufile_vpath)))
{ {
vfs_path_free (menufile_vpath); vfs_path_free (menufile_vpath);
menufile_vpath = vfs_path_build_filename (mc_global.share_data_dir, MC_GLOBAL_MENU, NULL); menufile_vpath =
vfs_path_build_filename (mc_global.share_data_dir, MC_GLOBAL_MENU, (char *) NULL);
} }
switch (dir) switch (dir)
@ -1036,11 +1039,13 @@ edit_mc_menu_cmd (void)
break; break;
case 2: case 2:
buffer_vpath = vfs_path_build_filename (mc_global.sysconfig_dir, MC_GLOBAL_MENU, NULL); buffer_vpath =
vfs_path_build_filename (mc_global.sysconfig_dir, MC_GLOBAL_MENU, (char *) NULL);
if (!exist_file (vfs_path_get_last_path_str (buffer_vpath))) if (!exist_file (vfs_path_get_last_path_str (buffer_vpath)))
{ {
vfs_path_free (buffer_vpath); vfs_path_free (buffer_vpath);
buffer_vpath = vfs_path_build_filename (mc_global.share_data_dir, MC_GLOBAL_MENU, NULL); buffer_vpath =
vfs_path_build_filename (mc_global.share_data_dir, MC_GLOBAL_MENU, (char *) NULL);
} }
break; break;
@ -1071,7 +1076,8 @@ edit_fhl_cmd (void)
_("Which highlighting file you want to edit?"), D_NORMAL, 2, _("Which highlighting file you want to edit?"), D_NORMAL, 2,
_("&User"), _("&System Wide")); _("&User"), _("&System Wide"));
} }
fhlfile_vpath = vfs_path_build_filename (mc_global.sysconfig_dir, MC_FHL_INI_FILE, NULL); fhlfile_vpath =
vfs_path_build_filename (mc_global.sysconfig_dir, MC_FHL_INI_FILE, (char *) NULL);
if (dir == 0) if (dir == 0)
{ {
@ -1088,7 +1094,7 @@ edit_fhl_cmd (void)
{ {
vfs_path_free (fhlfile_vpath); vfs_path_free (fhlfile_vpath);
fhlfile_vpath = fhlfile_vpath =
vfs_path_build_filename (mc_global.sysconfig_dir, MC_FHL_INI_FILE, NULL); vfs_path_build_filename (mc_global.sysconfig_dir, MC_FHL_INI_FILE, (char *) NULL);
} }
do_edit (fhlfile_vpath); do_edit (fhlfile_vpath);
} }

View File

@ -224,7 +224,7 @@ handle_cdpath (const char *path)
{ {
vfs_path_t *r_vpath; vfs_path_t *r_vpath;
r_vpath = vfs_path_build_filename (p, path, NULL); r_vpath = vfs_path_build_filename (p, path, (char *) NULL);
result = do_cd (r_vpath, cd_parse_command); result = do_cd (r_vpath, cd_parse_command);
vfs_path_free (r_vpath); vfs_path_free (r_vpath);
} }
@ -426,7 +426,9 @@ do_cd_command (char *orig_cmd)
if (IS_PATH_SEP (cmd[operand_pos])) if (IS_PATH_SEP (cmd[operand_pos]))
new_vpath = vfs_path_from_str (cmd + operand_pos); new_vpath = vfs_path_from_str (cmd + operand_pos);
else else
new_vpath = vfs_path_append_new (current_panel->cwd_vpath, cmd + operand_pos, NULL); new_vpath =
vfs_path_append_new (current_panel->cwd_vpath, cmd + operand_pos,
(char *) NULL);
sync_tree (new_vpath); sync_tree (new_vpath);
} }

View File

@ -208,7 +208,7 @@ dir_get_dotdot_stat (const vfs_path_t * vpath, struct stat *st)
{ {
vfs_path_t *tmp_vpath; vfs_path_t *tmp_vpath;
tmp_vpath = vfs_path_append_new (vpath, "..", NULL); tmp_vpath = vfs_path_append_new (vpath, "..", (char *) NULL);
ret = mc_stat (tmp_vpath, st) == 0; ret = mc_stat (tmp_vpath, st) == 0;
vfs_path_free (tmp_vpath); vfs_path_free (tmp_vpath);
} }

View File

@ -805,11 +805,12 @@ regex_command_for (void *target, const vfs_path_t * filename_vpath, const char *
{ {
g_free (extension_file); g_free (extension_file);
check_stock_mc_ext: check_stock_mc_ext:
extension_file = mc_build_filename (mc_global.sysconfig_dir, MC_LIB_EXT, NULL); extension_file = mc_build_filename (mc_global.sysconfig_dir, MC_LIB_EXT, (char *) NULL);
if (!exist_file (extension_file)) if (!exist_file (extension_file))
{ {
g_free (extension_file); g_free (extension_file);
extension_file = mc_build_filename (mc_global.share_data_dir, MC_LIB_EXT, NULL); extension_file =
mc_build_filename (mc_global.share_data_dir, MC_LIB_EXT, (char *) NULL);
} }
mc_user_ext = FALSE; mc_user_ext = FALSE;
} }

View File

@ -560,7 +560,7 @@ do_compute_dir_size (const vfs_path_t * dirname_vpath, dirsize_status_msg_t * ds
if (DIR_IS_DOT (dirent->d_name) || DIR_IS_DOTDOT (dirent->d_name)) if (DIR_IS_DOT (dirent->d_name) || DIR_IS_DOTDOT (dirent->d_name))
continue; continue;
tmp_vpath = vfs_path_append_new (dirname_vpath, dirent->d_name, NULL); tmp_vpath = vfs_path_append_new (dirname_vpath, dirent->d_name, (char *) NULL);
res = mc_lstat (tmp_vpath, &s); res = mc_lstat (tmp_vpath, &s);
if (res == 0) if (res == 0)
@ -1128,7 +1128,7 @@ recursive_erase (file_op_total_context_t * tctx, file_op_context_t * ctx, const
if (DIR_IS_DOT (next->d_name) || DIR_IS_DOTDOT (next->d_name)) if (DIR_IS_DOT (next->d_name) || DIR_IS_DOTDOT (next->d_name))
continue; continue;
tmp_vpath = vfs_path_append_new (vpath, next->d_name, NULL); tmp_vpath = vfs_path_append_new (vpath, next->d_name, (char *) NULL);
if (mc_lstat (tmp_vpath, &buf) != 0) if (mc_lstat (tmp_vpath, &buf) != 0)
{ {
mc_closedir (reading); mc_closedir (reading);
@ -1294,7 +1294,7 @@ panel_compute_totals (const WPanel * panel, dirsize_status_msg_t * sm, size_t *
vfs_path_t *p; vfs_path_t *p;
FileProgressStatus status; FileProgressStatus status;
p = vfs_path_append_new (panel->cwd_vpath, panel->dir.list[i].fname, NULL); p = vfs_path_append_new (panel->cwd_vpath, panel->dir.list[i].fname, (char *) NULL);
status = compute_dir_size (p, sm, &dir_count, ret_count, ret_total, compute_symlinks); status = compute_dir_size (p, sm, &dir_count, ret_count, ret_total, compute_symlinks);
vfs_path_free (p); vfs_path_free (p);
@ -2142,7 +2142,7 @@ copy_dir_dir (file_op_total_context_t * tctx, file_op_context_t * ctx, const cha
vfs_path_t *tmp; vfs_path_t *tmp;
tmp = dst_vpath; tmp = dst_vpath;
dst_vpath = vfs_path_append_new (dst_vpath, x_basename (s), NULL); dst_vpath = vfs_path_append_new (dst_vpath, x_basename (s), (char *) NULL);
vfs_path_free (tmp); vfs_path_free (tmp);
} }
@ -2210,7 +2210,7 @@ copy_dir_dir (file_op_total_context_t * tctx, file_op_context_t * ctx, const cha
continue; continue;
/* get the filename and add it to the src directory */ /* get the filename and add it to the src directory */
path = mc_build_filename (s, next->d_name, NULL); path = mc_build_filename (s, next->d_name, (char *) NULL);
tmp_vpath = vfs_path_from_str (path); tmp_vpath = vfs_path_from_str (path);
(*ctx->stat_func) (tmp_vpath, &buf); (*ctx->stat_func) (tmp_vpath, &buf);
@ -2218,7 +2218,7 @@ copy_dir_dir (file_op_total_context_t * tctx, file_op_context_t * ctx, const cha
{ {
char *mdpath; char *mdpath;
mdpath = mc_build_filename (d, next->d_name, NULL); mdpath = mc_build_filename (d, next->d_name, (char *) NULL);
/* /*
* From here, we just intend to recursively copy subdirs, not * From here, we just intend to recursively copy subdirs, not
* the double functionality of copying different when the target * the double functionality of copying different when the target
@ -2233,7 +2233,7 @@ copy_dir_dir (file_op_total_context_t * tctx, file_op_context_t * ctx, const cha
{ {
char *dest_file; char *dest_file;
dest_file = mc_build_filename (d, x_basename (path), NULL); dest_file = mc_build_filename (d, x_basename (path), (char *) NULL);
return_status = copy_file_file (tctx, ctx, path, dest_file); return_status = copy_file_file (tctx, ctx, path, dest_file);
g_free (dest_file); g_free (dest_file);
} }
@ -2331,7 +2331,7 @@ move_dir_dir (file_op_total_context_t * tctx, file_op_context_t * ctx, const cha
vfs_path_t *tmp; vfs_path_t *tmp;
tmp = dst_vpath; tmp = dst_vpath;
dst_vpath = vfs_path_append_new (dst_vpath, x_basename (s), NULL); dst_vpath = vfs_path_append_new (dst_vpath, x_basename (s), (char *) NULL);
vfs_path_free (tmp); vfs_path_free (tmp);
} }
@ -2877,7 +2877,7 @@ panel_operate (void *source_panel, FileOperation operation, gboolean force_singl
goto clean_up; goto clean_up;
} }
temp2 = mc_build_filename (repl_dest, temp, NULL); temp2 = mc_build_filename (repl_dest, temp, (char *) NULL);
g_free (temp); g_free (temp);
g_free (repl_dest); g_free (repl_dest);
g_free (dest); g_free (dest);
@ -2988,7 +2988,7 @@ panel_operate (void *source_panel, FileOperation operation, gboolean force_singl
goto clean_up; goto clean_up;
} }
temp2 = mc_build_filename (repl_dest, temp, NULL); temp2 = mc_build_filename (repl_dest, temp, (char *) NULL);
g_free (temp); g_free (temp);
g_free (repl_dest); g_free (repl_dest);
source_with_path_str = source_with_path_str =

View File

@ -92,7 +92,7 @@ my_mkdir_rec (const vfs_path_t * s_vpath, mode_t mode)
return (-1); return (-1);
} }
q = vfs_path_append_new (s_vpath, "..", NULL); q = vfs_path_append_new (s_vpath, "..", (char *) NULL);
result = my_mkdir_rec (q, mode); result = my_mkdir_rec (q, mode);
vfs_path_free (q); vfs_path_free (q);

View File

@ -748,7 +748,7 @@ put_link (WPanel * panel)
vfs_path_t *vpath; vfs_path_t *vpath;
int i; int i;
vpath = vfs_path_append_new (panel->cwd_vpath, selection (panel)->fname, NULL); vpath = vfs_path_append_new (panel->cwd_vpath, selection (panel)->fname, (char *) NULL);
i = mc_readlink (vpath, buffer, sizeof (buffer) - 1); i = mc_readlink (vpath, buffer, sizeof (buffer) - 1);
vfs_path_free (vpath); vfs_path_free (vpath);
@ -966,7 +966,7 @@ prepend_cwd_on_local (const char *filename)
vfs_path_free (vpath); vfs_path_free (vpath);
return vfs_path_append_new (vfs_get_raw_current_dir (), filename, NULL); return vfs_path_append_new (vfs_get_raw_current_dir (), filename, (char *) NULL);
} }
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */

View File

@ -1008,7 +1008,8 @@ display_mini_info (WPanel * panel)
int len; int len;
lc_link_vpath = lc_link_vpath =
vfs_path_append_new (panel->cwd_vpath, panel->dir.list[panel->selected].fname, NULL); vfs_path_append_new (panel->cwd_vpath, panel->dir.list[panel->selected].fname,
(char *) NULL);
len = mc_readlink (lc_link_vpath, link_target, MC_MAXPATHLEN - 1); len = mc_readlink (lc_link_vpath, link_target, MC_MAXPATHLEN - 1);
vfs_path_free (lc_link_vpath); vfs_path_free (lc_link_vpath);
if (len > 0) if (len > 0)
@ -2771,7 +2772,7 @@ do_enter_on_file_entry (file_entry_t * fe)
return TRUE; return TRUE;
} }
full_name_vpath = vfs_path_append_new (current_panel->cwd_vpath, fe->fname, NULL); full_name_vpath = vfs_path_append_new (current_panel->cwd_vpath, fe->fname, (char *) NULL);
/* Try associated command */ /* Try associated command */
ok = regex_command (full_name_vpath, "Open") != 0; ok = regex_command (full_name_vpath, "Open") != 0;
@ -2780,7 +2781,7 @@ do_enter_on_file_entry (file_entry_t * fe)
return TRUE; return TRUE;
/* Check if the file is executable */ /* Check if the file is executable */
full_name_vpath = vfs_path_append_new (current_panel->cwd_vpath, fe->fname, NULL); full_name_vpath = vfs_path_append_new (current_panel->cwd_vpath, fe->fname, (char *) NULL);
ok = (is_exe (fe->st.st_mode) && if_link_is_exe (full_name_vpath, fe)); ok = (is_exe (fe->st.st_mode) && if_link_is_exe (full_name_vpath, fe));
vfs_path_free (full_name_vpath); vfs_path_free (full_name_vpath);
if (!ok) if (!ok)
@ -2799,7 +2800,7 @@ do_enter_on_file_entry (file_entry_t * fe)
int ret; int ret;
vfs_path_t *tmp_vpath; vfs_path_t *tmp_vpath;
tmp_vpath = vfs_path_append_new (vfs_get_raw_current_dir (), fe->fname, NULL); tmp_vpath = vfs_path_append_new (vfs_get_raw_current_dir (), fe->fname, (char *) NULL);
ret = mc_setctl (tmp_vpath, VFS_SETCTL_RUN, NULL); ret = mc_setctl (tmp_vpath, VFS_SETCTL_RUN, NULL);
vfs_path_free (tmp_vpath); vfs_path_free (tmp_vpath);
/* We took action only if the dialog was shown or the execution /* We took action only if the dialog was shown or the execution
@ -2846,7 +2847,7 @@ chdir_other_panel (WPanel * panel)
set_display_type (get_other_index (), view_listing); set_display_type (get_other_index (), view_listing);
if (S_ISDIR (entry->st.st_mode) || entry->f.link_to_dir) if (S_ISDIR (entry->st.st_mode) || entry->f.link_to_dir)
new_dir_vpath = vfs_path_append_new (panel->cwd_vpath, entry->fname, NULL); new_dir_vpath = vfs_path_append_new (panel->cwd_vpath, entry->fname, (char *) NULL);
else else
{ {
new_dir_vpath = vfs_path_append_new (panel->cwd_vpath, "..", (char *) NULL); new_dir_vpath = vfs_path_append_new (panel->cwd_vpath, "..", (char *) NULL);
@ -2931,7 +2932,7 @@ chdir_to_readlink (WPanel * panel)
if (IS_PATH_SEP (*buffer)) if (IS_PATH_SEP (*buffer))
new_dir_vpath = vfs_path_from_str (buffer); new_dir_vpath = vfs_path_from_str (buffer);
else else
new_dir_vpath = vfs_path_append_new (panel->cwd_vpath, buffer, NULL); new_dir_vpath = vfs_path_append_new (panel->cwd_vpath, buffer, (char *) NULL);
change_panel (); change_panel ();
do_cd (new_dir_vpath, cd_exact); do_cd (new_dir_vpath, cd_exact);
@ -4162,7 +4163,8 @@ panel_recursive_cd_to_parent (const vfs_path_t * vpath)
tmp_vpath = vfs_path_vtokens_get (cwd_vpath, 0, -1); tmp_vpath = vfs_path_vtokens_get (cwd_vpath, 0, -1);
vfs_path_free (cwd_vpath); vfs_path_free (cwd_vpath);
cwd_vpath = vfs_path_build_filename (PATH_SEP_STR, vfs_path_as_str (tmp_vpath), NULL); cwd_vpath =
vfs_path_build_filename (PATH_SEP_STR, vfs_path_as_str (tmp_vpath), (char *) NULL);
vfs_path_free (tmp_vpath); vfs_path_free (tmp_vpath);
} }

View File

@ -419,7 +419,7 @@ do_panelize_cd (WPanel * panel)
tmp_vpath = tmp_vpath =
vfs_path_append_new (panelized_panel.root_vpath, panelized_panel.list.list[i].fname, vfs_path_append_new (panelized_panel.root_vpath, panelized_panel.list.list[i].fname,
NULL); (char *) NULL);
fname = vfs_path_as_str (tmp_vpath); fname = vfs_path_as_str (tmp_vpath);
list->list[i].fnamelen = strlen (fname); list->list[i].fnamelen = strlen (fname);
list->list[i].fname = g_strndup (fname, list->list[i].fnamelen); list->list[i].fname = g_strndup (fname, list->list[i].fnamelen);

View File

@ -745,9 +745,9 @@ tree_store_mark_checked (const char *subname)
cname = vfs_path_as_str (ts.check_name); cname = vfs_path_as_str (ts.check_name);
if (IS_PATH_SEP (cname[0]) && cname[1] == '\0') if (IS_PATH_SEP (cname[0]) && cname[1] == '\0')
name = vfs_path_build_filename (PATH_SEP_STR, subname, NULL); name = vfs_path_build_filename (PATH_SEP_STR, subname, (char *) NULL);
else else
name = vfs_path_append_new (ts.check_name, subname, NULL); name = vfs_path_append_new (ts.check_name, subname, (char *) NULL);
/* Search for the subdirectory */ /* Search for the subdirectory */
current = ts.check_start; current = ts.check_start;
@ -923,7 +923,7 @@ tree_store_rescan (const vfs_path_t * vpath)
if (DIR_IS_DOT (dp->d_name) || DIR_IS_DOTDOT (dp->d_name)) if (DIR_IS_DOT (dp->d_name) || DIR_IS_DOTDOT (dp->d_name))
continue; continue;
tmp_vpath = vfs_path_append_new (vpath, dp->d_name, NULL); tmp_vpath = vfs_path_append_new (vpath, dp->d_name, (char *) NULL);
if (mc_lstat (tmp_vpath, &buf) != -1 && S_ISDIR (buf.st_mode)) if (mc_lstat (tmp_vpath, &buf) != -1 && S_ISDIR (buf.st_mode))
tree_store_mark_checked (dp->d_name); tree_store_mark_checked (dp->d_name);
vfs_path_free (tmp_vpath); vfs_path_free (tmp_vpath);

View File

@ -957,21 +957,22 @@ user_menu_cmd (const WEdit * edit_widget, const char *menu_file, int selected_en
g_free (menu); g_free (menu);
menu = menu =
mc_build_filename (mc_config_get_home_dir (), mc_build_filename (mc_config_get_home_dir (),
edit_widget != NULL ? EDIT_GLOBAL_MENU : MC_GLOBAL_MENU, NULL); edit_widget != NULL ? EDIT_GLOBAL_MENU : MC_GLOBAL_MENU,
(char *) NULL);
if (!exist_file (menu)) if (!exist_file (menu))
{ {
g_free (menu); g_free (menu);
menu = menu =
mc_build_filename (mc_global.sysconfig_dir, mc_build_filename (mc_global.sysconfig_dir,
edit_widget != NULL ? EDIT_GLOBAL_MENU : MC_GLOBAL_MENU, edit_widget != NULL ? EDIT_GLOBAL_MENU : MC_GLOBAL_MENU,
NULL); (char *) NULL);
if (!exist_file (menu)) if (!exist_file (menu))
{ {
g_free (menu); g_free (menu);
menu = menu =
mc_build_filename (mc_global.share_data_dir, mc_build_filename (mc_global.share_data_dir,
edit_widget != NULL ? EDIT_GLOBAL_MENU : MC_GLOBAL_MENU, edit_widget != NULL ? EDIT_GLOBAL_MENU : MC_GLOBAL_MENU,
NULL); (char *) NULL);
} }
} }
} }

View File

@ -451,9 +451,9 @@ load_setup_get_full_config_name (const char *subdir, const char *config_file_nam
return NULL; return NULL;
if (subdir != NULL) if (subdir != NULL)
ret = g_build_filename (mc_config_get_path (), subdir, lc_basename, NULL); ret = g_build_filename (mc_config_get_path (), subdir, lc_basename, (char *) NULL);
else else
ret = g_build_filename (mc_config_get_path (), lc_basename, NULL); ret = g_build_filename (mc_config_get_path (), lc_basename, (char *) NULL);
if (exist_file (ret)) if (exist_file (ret))
{ {
@ -464,9 +464,9 @@ load_setup_get_full_config_name (const char *subdir, const char *config_file_nam
g_free (ret); g_free (ret);
if (subdir != NULL) if (subdir != NULL)
ret = g_build_filename (mc_global.sysconfig_dir, subdir, lc_basename, NULL); ret = g_build_filename (mc_global.sysconfig_dir, subdir, lc_basename, (char *) NULL);
else else
ret = g_build_filename (mc_global.sysconfig_dir, lc_basename, NULL); ret = g_build_filename (mc_global.sysconfig_dir, lc_basename, (char *) NULL);
if (exist_file (ret)) if (exist_file (ret))
{ {
@ -477,9 +477,9 @@ load_setup_get_full_config_name (const char *subdir, const char *config_file_nam
g_free (ret); g_free (ret);
if (subdir != NULL) if (subdir != NULL)
ret = g_build_filename (mc_global.share_data_dir, subdir, lc_basename, NULL); ret = g_build_filename (mc_global.share_data_dir, subdir, lc_basename, (char *) NULL);
else else
ret = g_build_filename (mc_global.share_data_dir, lc_basename, NULL); ret = g_build_filename (mc_global.share_data_dir, lc_basename, (char *) NULL);
g_free (lc_basename); g_free (lc_basename);
@ -730,11 +730,12 @@ load_setup_get_keymap_profile_config (gboolean load_from_file)
/* load and merge global keymaps */ /* load and merge global keymaps */
/* 1) /usr/share/mc (mc_global.share_data_dir) */ /* 1) /usr/share/mc (mc_global.share_data_dir) */
share_keymap = g_build_filename (mc_global.share_data_dir, GLOBAL_KEYMAP_FILE, NULL); share_keymap = g_build_filename (mc_global.share_data_dir, GLOBAL_KEYMAP_FILE, (char *) NULL);
load_setup_init_config_from_file (&keymap_config, share_keymap, TRUE); load_setup_init_config_from_file (&keymap_config, share_keymap, TRUE);
/* 2) /etc/mc (mc_global.sysconfig_dir) */ /* 2) /etc/mc (mc_global.sysconfig_dir) */
sysconfig_keymap = g_build_filename (mc_global.sysconfig_dir, GLOBAL_KEYMAP_FILE, NULL); sysconfig_keymap =
g_build_filename (mc_global.sysconfig_dir, GLOBAL_KEYMAP_FILE, (char *) NULL);
load_setup_init_config_from_file (&keymap_config, sysconfig_keymap, TRUE); load_setup_init_config_from_file (&keymap_config, sysconfig_keymap, TRUE);
/* then load and merge one of user-defined keymap */ /* then load and merge one of user-defined keymap */
@ -961,7 +962,7 @@ setup_init (void)
{ {
char *inifile; char *inifile;
inifile = mc_build_filename (mc_global.sysconfig_dir, "mc.ini", NULL); inifile = mc_build_filename (mc_global.sysconfig_dir, "mc.ini", (char *) NULL);
if (exist_file (inifile)) if (exist_file (inifile))
{ {
g_free (profile); g_free (profile);
@ -970,7 +971,7 @@ setup_init (void)
else else
{ {
g_free (inifile); g_free (inifile);
inifile = mc_build_filename (mc_global.share_data_dir, "mc.ini", NULL); inifile = mc_build_filename (mc_global.share_data_dir, "mc.ini", (char *) NULL);
if (!exist_file (inifile)) if (!exist_file (inifile))
g_free (inifile); g_free (inifile);
else else

View File

@ -293,7 +293,7 @@ init_subshell_child (const char *pty_name)
input_file = mc_config_get_full_path ("inputrc"); input_file = mc_config_get_full_path ("inputrc");
if (exist_file (input_file)) if (exist_file (input_file))
{ {
putenv_str = g_strconcat ("INPUTRC=", input_file, NULL); putenv_str = g_strconcat ("INPUTRC=", input_file, (char *) NULL);
putenv (putenv_str); putenv (putenv_str);
} }
g_free (input_file); g_free (input_file);
@ -314,7 +314,7 @@ init_subshell_child (const char *pty_name)
} }
/* Put init file to ENV variable used by ash */ /* Put init file to ENV variable used by ash */
putenv_str = g_strconcat ("ENV=", init_file, NULL); putenv_str = g_strconcat ("ENV=", init_file, (char *) NULL);
putenv (putenv_str); putenv (putenv_str);
/* Do not use "g_free (putenv_str)" here, otherwise ENV will be undefined! */ /* Do not use "g_free (putenv_str)" here, otherwise ENV will be undefined! */

View File

@ -64,7 +64,7 @@ What to do with this?
int f = !strcmp( remote_path, "/~" ); int f = !strcmp( remote_path, "/~" );
if (f || !strncmp( remote_path, "/~/", 3 )) { if (f || !strncmp( remote_path, "/~/", 3 )) {
char *s; char *s;
s = mc_build_filename ( qhome (*bucket), remote_path +3-f, NULL ); s = mc_build_filename ( qhome (*bucket), remote_path +3-f, (char *) NULL );
g_free (remote_path); g_free (remote_path);
remote_path = s; remote_path = s;
} }
@ -1695,7 +1695,7 @@ ftpfs_dir_load (struct vfs_class *me, struct vfs_s_inode *dir, char *remote_path
char *path; char *path;
/* Trailing "/." is necessary if remote_path is a symlink */ /* Trailing "/." is necessary if remote_path is a symlink */
path = mc_build_filename (remote_path, ".", NULL); path = mc_build_filename (remote_path, ".", (char *) NULL);
sock = ftpfs_open_data_connection (me, super, "LIST -la", path, TYPE_ASCII, 0); sock = ftpfs_open_data_connection (me, super, "LIST -la", path, TYPE_ASCII, 0);
g_free (path); g_free (path);
} }

View File

@ -1371,7 +1371,7 @@ smbfs_get_path (smbfs_connection ** sc, const vfs_path_t * vpath)
{ {
char *s; char *s;
s = mc_build_filename ((*sc)->home, remote_path + 3 - f, NULL); s = mc_build_filename ((*sc)->home, remote_path + 3 - f, (char *) NULL);
g_free (remote_path); g_free (remote_path);
remote_path = s; remote_path = s;
} }

View File

@ -56,31 +56,31 @@ run_mc_build_filename (int iteration)
switch (iteration) switch (iteration)
{ {
case 0: case 0:
return mc_build_filename ("test", "path", NULL); return mc_build_filename ("test", "path", (char *) NULL);
case 1: case 1:
return mc_build_filename ("/test", "path/", NULL); return mc_build_filename ("/test", "path/", (char *) NULL);
case 2: case 2:
return mc_build_filename ("/test", "pa/th", NULL); return mc_build_filename ("/test", "pa/th", (char *) NULL);
case 3: case 3:
return mc_build_filename ("/test", "#vfsprefix:", "path ", NULL); return mc_build_filename ("/test", "#vfsprefix:", "path ", (char *) NULL);
case 4: case 4:
return mc_build_filename ("/test", "vfsprefix://", "path ", NULL); return mc_build_filename ("/test", "vfsprefix://", "path ", (char *) NULL);
case 5: case 5:
return mc_build_filename ("/test", "vfs/../prefix:///", "p\\///ath", NULL); return mc_build_filename ("/test", "vfs/../prefix:///", "p\\///ath", (char *) NULL);
case 6: case 6:
return mc_build_filename ("/test", "path", "..", "/test", "path/", NULL); return mc_build_filename ("/test", "path", "..", "/test", "path/", (char *) NULL);
case 7: case 7:
return mc_build_filename ("", "path", NULL); return mc_build_filename ("", "path", (char *) NULL);
case 8: case 8:
return mc_build_filename ("", "/path", NULL); return mc_build_filename ("", "/path", (char *) NULL);
case 9: case 9:
return mc_build_filename ("path", "", NULL); return mc_build_filename ("path", "", (char *) NULL);
case 10: case 10:
return mc_build_filename ("/path", "", NULL); return mc_build_filename ("/path", "", (char *) NULL);
case 11: case 11:
return mc_build_filename ("pa", "", "th", NULL); return mc_build_filename ("pa", "", "th", (char *) NULL);
case 12: case 12:
return mc_build_filename ("/pa", "", "/th", NULL); return mc_build_filename ("/pa", "", "/th", (char *) NULL);
default: default:
return NULL; return NULL;
} }

View File

@ -41,7 +41,7 @@ static char *ini_filename;
static void static void
config_object__init (void) config_object__init (void)
{ {
ini_filename = g_build_filename (WORKDIR, "config_string.ini", NULL); ini_filename = g_build_filename (WORKDIR, "config_string.ini", (char *) NULL);
unlink (ini_filename); unlink (ini_filename);
mc_config = mc_config_init (ini_filename, FALSE); mc_config = mc_config_init (ini_filename, FALSE);

View File

@ -203,7 +203,8 @@ START_PARAMETRIZED_TEST (test_user_config_paths, test_user_config_paths_ds)
char *expected_file_path; char *expected_file_path;
expected_file_path = expected_file_path =
g_build_filename (data->input_base_dir, MC_USERCONF_DIR, data->input_file_name, NULL); g_build_filename (data->input_base_dir, MC_USERCONF_DIR, data->input_file_name,
(char *) NULL);
mctest_assert_str_eq (actual_result, expected_file_path); mctest_assert_str_eq (actual_result, expected_file_path);
g_free (expected_file_path); g_free (expected_file_path);
} }

View File

@ -104,7 +104,7 @@ START_TEST (test_mc_mkstemps)
/* when */ /* when */
fd = mc_mkstemps (&pname_vpath, "mctest-", NULL); fd = mc_mkstemps (&pname_vpath, "mctest-", NULL);
begin_pname = g_build_filename (mc_tmpdir (), "mctest-", NULL); begin_pname = g_build_filename (mc_tmpdir (), "mctest-", (char *) NULL);
/* then */ /* then */
close (fd); close (fd);