gems: support -Weffc++ in vfs.h

This commit is contained in:
Norman Feske 2018-03-26 13:44:04 +02:00 committed by Christian Helmuth
parent 07cd0d5809
commit c9d90c7f9f

View File

@ -1,4 +1,4 @@
/* /*
* \brief Front-end API for accessing a component-local virtual file system * \brief Front-end API for accessing a component-local virtual file system
* \author Norman Feske * \author Norman Feske
* \date 2017-07-04 * \date 2017-07-04
@ -29,7 +29,7 @@ namespace Genode {
} }
struct Genode::Directory : Noncopyable struct Genode::Directory : Noncopyable, Interface
{ {
public: public:
@ -40,7 +40,7 @@ struct Genode::Directory : Noncopyable
{ {
private: private:
Vfs::Directory_service::Dirent _dirent; Vfs::Directory_service::Dirent _dirent { };
friend class Directory; friend class Directory;
@ -72,6 +72,12 @@ struct Genode::Directory : Noncopyable
private: private:
/*
* Noncopyable
*/
Directory(Directory const &);
Directory &operator = (Directory const &);
Path const _path; Path const _path;
Vfs::File_system &_fs; Vfs::File_system &_fs;
@ -232,7 +238,7 @@ struct Genode::Root_directory : public Vfs::Io_response_handler,
}; };
struct Genode::File : Noncopyable struct Genode::File : Noncopyable, Interface
{ {
struct Open_failed : Exception { }; struct Open_failed : Exception { };
@ -246,6 +252,12 @@ class Genode::Readonly_file : public File
{ {
private: private:
/*
* Noncopyable
*/
Readonly_file(Readonly_file const &);
Readonly_file &operator = (Readonly_file const &);
Vfs::Vfs_handle *_handle = nullptr; Vfs::Vfs_handle *_handle = nullptr;
Genode::Entrypoint &_ep; Genode::Entrypoint &_ep;
@ -343,6 +355,12 @@ class Genode::File_content
char *_buffer = (char *)_alloc.alloc(_size); char *_buffer = (char *)_alloc.alloc(_size);
/*
* Noncopyable
*/
File_content(File_content const &);
File_content &operator = (File_content const &);
public: public:
typedef Directory::Nonexistent_file Nonexistent_file; typedef Directory::Nonexistent_file Nonexistent_file;