Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 44eb7054 authored by T.J. Mercier's avatar T.J. Mercier
Browse files

Fix unused params and remove unneeded cflags

We already get -Wall and -Werror from the build system, and we do not
want/need -Wexit-time-destructors since it prevents local statics with
non-trivial destructors.

Test: m
Change-Id: I8283bf223404d6c253861d3888c1b720c099386e
parent bc3476d5
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -5,12 +5,6 @@ package {
cc_defaults {
    name: "libprocessgroup_defaults",
    cpp_std: "gnu++20",
    cflags: [
        "-Wall",
        "-Werror",
        "-Wexit-time-destructors",
        "-Wno-unused-parameter",
    ],
}

cc_library_headers {
+4 −4
Original line number Diff line number Diff line
@@ -82,8 +82,8 @@ class ProfileAction {

    virtual void EnableResourceCaching(ResourceCacheType) {}
    virtual void DropResourceCaching(ResourceCacheType) {}
    virtual bool IsValidForProcess(uid_t uid, pid_t pid) const { return false; }
    virtual bool IsValidForTask(pid_t tid) const { return false; }
    virtual bool IsValidForProcess(uid_t, pid_t) const { return false; }
    virtual bool IsValidForTask(pid_t) const { return false; }

  protected:
    enum CacheUseResult { SUCCESS, FAIL, UNUSED };
@@ -109,8 +109,8 @@ class SetTimerSlackAction : public ProfileAction {

    const char* Name() const override { return "SetTimerSlack"; }
    bool ExecuteForTask(pid_t tid) const override;
    bool IsValidForProcess(uid_t uid, pid_t pid) const override { return true; }
    bool IsValidForTask(pid_t tid) const override { return true; }
    bool IsValidForProcess(uid_t, pid_t) const override { return true; }
    bool IsValidForTask(pid_t) const override { return true; }

  private:
    unsigned long slack_;
+3 −4
Original line number Diff line number Diff line
@@ -102,8 +102,7 @@ class ProfileAttributeMock : public IProfileAttribute {
  public:
    ProfileAttributeMock(const std::string& file_name) : file_name_(file_name) {}
    ~ProfileAttributeMock() override = default;
    void Reset(const CgroupController& controller, const std::string& file_name,
               const std::string& file_v2_name) override {
    void Reset(const CgroupController&, const std::string&, const std::string&) override {
        CHECK(false);
    }
    const CgroupController* controller() const override {
@@ -111,10 +110,10 @@ class ProfileAttributeMock : public IProfileAttribute {
        return {};
    }
    const std::string& file_name() const override { return file_name_; }
    bool GetPathForProcess(uid_t uid, pid_t pid, std::string* path) const override {
    bool GetPathForProcess(uid_t, pid_t pid, std::string* path) const override {
        return GetPathForTask(pid, path);
    }
    bool GetPathForTask(int tid, std::string* path) const override {
    bool GetPathForTask(int, std::string* path) const override {
#ifdef __ANDROID__
        CHECK(CgroupGetControllerPath(CGROUPV2_HIERARCHY_NAME, path));
        CHECK_GT(path->length(), 0);