Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some compiler warning #321

Merged
merged 1 commit into from
Jan 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions common/simple_dom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,19 @@ static NodeImpl* parse_json(char* text, size_t size, int flags) {
Reader reader;
reader.Parse<flags>(stream(text), handler);
*/
return {nullptr};
return nullptr;
}

static NodeImpl* parse_xml(char* text, size_t size, int flags) {
return {nullptr};
return nullptr;
}

static NodeImpl* parse_yaml(char* text, size_t size, int flags) {
return {nullptr};
return nullptr;
}

static NodeImpl* parse_ini(char* text, size_t size, int flags) {
return {nullptr};
return nullptr;
}

Node parse(char* text, size_t size, int flags) {
Expand Down
5 changes: 2 additions & 3 deletions common/simple_dom_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,11 @@ namespace SimpleDOM {

using str = estring_view;

struct Node;

// the interface for internal implementations
class NodeImpl : public Object {
protected:
NodeImpl() = default;
NodeImpl() = delete;
NodeImpl* _root;
union {
NodeImpl* _next;
Expand All @@ -60,7 +59,7 @@ union {
delete this;
}

friend struct Node;
friend class Node;

public:
virtual size_t num_children() const __attribute__((pure)) = 0;
Expand Down
16 changes: 8 additions & 8 deletions fs/subfs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -231,56 +231,56 @@ namespace fs
return underlayfs->mknod(path, mode, dev);
}

virtual ssize_t getxattr(const char *path, const char *name, void *value, size_t size)
virtual ssize_t getxattr(const char *path, const char *name, void *value, size_t size) override
{
if (!underlay_xattrfs)
LOG_ERROR_RETURN(ENOTSUP, -1, "xattr is not supported by underlay fs");
PathCat __(this, path);
return underlay_xattrfs->getxattr(path, name, value, size);
}
virtual ssize_t lgetxattr(const char *path, const char *name, void *value, size_t size)
virtual ssize_t lgetxattr(const char *path, const char *name, void *value, size_t size) override
{
if (!underlay_xattrfs)
LOG_ERROR_RETURN(ENOTSUP, -1, "xattr is not supported by underlay fs");
PathCat __(this, path);
return underlay_xattrfs->lgetxattr(path, name, value, size);
}
virtual ssize_t listxattr(const char *path, char *list, size_t size)
virtual ssize_t listxattr(const char *path, char *list, size_t size) override
{
if (!underlay_xattrfs)
LOG_ERROR_RETURN(ENOTSUP, -1, "xattr is not supported by underlay fs");
PathCat __(this, path);
return underlay_xattrfs->listxattr(path, list, size);
}
virtual ssize_t llistxattr(const char *path, char *list, size_t size)
virtual ssize_t llistxattr(const char *path, char *list, size_t size) override
{
if (!underlay_xattrfs)
LOG_ERROR_RETURN(ENOTSUP, -1, "xattr is not supported by underlay fs");
PathCat __(this, path);
return underlay_xattrfs->llistxattr(path, list, size);
}
virtual int setxattr(const char *path, const char *name, const void *value, size_t size, int flags)
virtual int setxattr(const char *path, const char *name, const void *value, size_t size, int flags) override
{
if (!underlay_xattrfs)
LOG_ERROR_RETURN(ENOTSUP, -1, "xattr is not supported by underlay fs");
PathCat __(this, path);
return underlay_xattrfs->setxattr(path, name, value, size, flags);
}
virtual int lsetxattr(const char *path, const char *name, const void *value, size_t size, int flags)
virtual int lsetxattr(const char *path, const char *name, const void *value, size_t size, int flags) override
{
if (!underlay_xattrfs)
LOG_ERROR_RETURN(ENOTSUP, -1, "xattr is not supported by underlay fs");
PathCat __(this, path);
return underlay_xattrfs->lsetxattr(path, name, value, size, flags);
}
virtual int removexattr(const char *path, const char *name)
virtual int removexattr(const char *path, const char *name) override
{
if (!underlay_xattrfs)
LOG_ERROR_RETURN(ENOTSUP, -1, "xattr is not supported by underlay fs");
PathCat __(this, path);
return underlay_xattrfs->removexattr(path, name);
}
virtual int lremovexattr(const char *path, const char *name)
virtual int lremovexattr(const char *path, const char *name) override
{
if (!underlay_xattrfs)
LOG_ERROR_RETURN(ENOTSUP, -1, "xattr is not supported by underlay fs");
Expand Down