project-slippi / Ishiiruka

GNU General Public License v2.0
329 stars 140 forks source link

Prevent compilation errors on macOS #381

Closed rapito closed 1 year ago

rapito commented 1 year ago

Prevent build warnings being treated as errors for unused variables on semver project. This is on on MacOS monterrrey 12.6.

There's a specific file that was updated on the semver project leaving a few variables unused that won't allow the compiler to continue unless these warnings are ignored.

inline void prerelease_version_validator(const string&, const char c) {
    bool res = false;
    for (const auto& r : allowed_prerel_id_chars) {
        res |= (c >= r.first && c <= r.second);
    }
    //if (!res)
    //  throw Parse_error("invalid character encountered: " + string(1, c));
}

In here, res is not used.

Alternatively the slippi codebase could either comply with prelease_version_validator expectations or update the method to a nop.

But honestly, I think it's not worth the hassle and ignoring the warnings should be fine just for this target.

ryanmcgrath commented 1 year ago

Someone can correct me if I'm wrong but this is probably safe and good to merge as long as this project still needs to build on Intel for the foreseeable future (e.g if CI runners update).

Mainline needs the same patch at its current revision IIRC.

rapito commented 1 year ago

Closing because I don't want to spend time fixing the git history after messing up the rebase, I just opened a new one.