Cleanup cppcheck warnings.

Make cppcheck happy.

lib/search/regex.c:888:85: error: Uninitialized variable: *error [uninitvar]
        if (pcre2_jit_compile (mc_search_cond->regex_handle, PCRE2_JIT_COMPLETE) && *error != '\0')
                                                                                    ^
src/vfs/sftpfs/dir.c:95:26: warning: Uninitialized variable: handle [uninitvar]
    sftpfs_dir->handle = handle;
                         ^
Found by cppcheck-2.16.0

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andreas Mohr 2024-12-15 09:00:00 +00:00 committed by Andrew Borodin
parent 6de5e620eb
commit 9ef2cb4efd
2 changed files with 2 additions and 2 deletions

View File

@ -839,7 +839,7 @@ mc_search__cond_struct_new_init_regex (const char *charset, mc_search_t *lc_mc_s
#ifdef HAVE_PCRE2
int errcode;
char error[BUF_SMALL];
char error[BUF_SMALL] = "";
size_t erroffset;
int pcre_options = PCRE2_MULTILINE;
#else

View File

@ -68,7 +68,7 @@ sftpfs_opendir (const vfs_path_t *vpath, GError **mcerror)
sftpfs_dir_data_t *sftpfs_dir;
sftpfs_super_t *sftpfs_super;
const vfs_path_element_t *path_element;
LIBSSH2_SFTP_HANDLE *handle;
LIBSSH2_SFTP_HANDLE *handle = NULL;
const GString *fixfname;
if (!sftpfs_op_init (&sftpfs_super, &path_element, vpath, mcerror))