adeharo9/cpp-dotenv

Unused parameter 'unbind(std::string& s)' line 397

Closed this issue · 2 comments

The use of the library on a project using the compilation option "-Wunused-parameter" shows that the function "inline void unbind(std::string& s)" line 397 does not use its parameter.

I use the library with FetchContent.

A solution would be to set the library's compilation options in its CMakeLists.txt with target_compile_options or removing the parameter name in the code like this :

        inline void unbind(std::string& /*s*/)
        {
            binded = nullptr;
            bond = false;
        }

Do you have any other solutions?

Absolutely right. I guess at some point during the initial development I simply removed its usage from the unbind function but failed to delete the parameter and update the rest of the code.

I'll simply remove it and add the change for the next update on master.

Solved and merged to dev.

Merging to master is still pending, but will happen in the upcoming days with several more changes and updates than I'm introducing.

Closing the issue for now.