From 94d719be61e2f2c07accbac2d0f067e0cb9ce001 Mon Sep 17 00:00:00 2001 From: Adrien JUND Date: Tue, 20 Sep 2016 09:44:13 +0200 Subject: [PATCH] Fix fuse build warnings --- dokan_fuse/include/fusemain.h | 2 +- dokan_fuse/src/fusemain.cpp | 9 +++++---- dokan_fuse/src/utils.cpp | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/dokan_fuse/include/fusemain.h b/dokan_fuse/include/fusemain.h index 94a6f80..6320dbf 100644 --- a/dokan_fuse/include/fusemain.h +++ b/dokan_fuse/include/fusemain.h @@ -199,7 +199,7 @@ class impl_file_lock int lock_file(impl_file_handle *file, long long start, long long len, bool mark=true); int unlock_file(impl_file_handle *file, long long start, long long len); public: - impl_file_lock(impl_file_locks* _locks, const std::string& name): locks(_locks), name_(name), first(NULL) { InitializeCriticalSection(&lock); } + impl_file_lock(impl_file_locks* _locks, const std::string& name): name_(name), locks(_locks), first(NULL) { InitializeCriticalSection(&lock); } ~impl_file_lock() { DeleteCriticalSection(&lock); }; void remove_file(impl_file_handle *file); const std::string& get_name() const {return name_;} diff --git a/dokan_fuse/src/fusemain.cpp b/dokan_fuse/src/fusemain.cpp index 4a6ff58..a42fa43 100644 --- a/dokan_fuse/src/fusemain.cpp +++ b/dokan_fuse/src/fusemain.cpp @@ -74,9 +74,9 @@ impl_fuse_context::impl_fuse_context(const struct fuse_operations *ops, unsigned int filemask, unsigned int dirmask, const char *fsname, const char *volname) - : ops_(*ops), debug_(debug), filemask_(filemask), dirmask_(dirmask), - fsname_(fsname), volname_(volname), - user_data_(user_data) // Use current user data + : ops_(*ops), user_data_(user_data), debug_(debug), filemask_(filemask), + dirmask_(dirmask), fsname_(fsname), + volname_(volname) // Use current user data { // Reset connection info memset(&conn_info_, 0, sizeof(fuse_conn_info)); @@ -256,8 +256,9 @@ int impl_fuse_context::check_and_resolve(std::string *name) { struct FUSE_STAT stat = {0}; CHECKED(ops_.getattr(name->c_str(), &stat)); - if (S_ISLNK(stat.st_mode)) + if (S_ISLNK(stat.st_mode)) { CHECKED(resolve_symlink(*name, name)); + } return 0; } diff --git a/dokan_fuse/src/utils.cpp b/dokan_fuse/src/utils.cpp index adf9509..a36a05a 100644 --- a/dokan_fuse/src/utils.cpp +++ b/dokan_fuse/src/utils.cpp @@ -139,7 +139,7 @@ static size_t convert_char(get_conver_t get_func, put_convert_t put_func, size_t total = 0; while (il) { - ICONV_CHAR out_c; + ICONV_CHAR out_c = 0; size_t readed = get_func(ib, il, &out_c); if (unlikely(readed < 0)) return -1; -- 2.8.0.windows.1