Codechange: Silence warnings about intentionally unused parameters.

This commit is contained in:
frosch
2023-09-16 22:20:53 +02:00
committed by frosch
parent df400ef84a
commit b6c8f301be
227 changed files with 972 additions and 1039 deletions

View File

@@ -53,7 +53,7 @@ class CrashLogUnix : public CrashLog {
survey["reason"] = strsignal(signum);
}
void SurveyStacktrace(nlohmann::json &survey) const override
void SurveyStacktrace([[maybe_unused]] nlohmann::json &survey) const override
{
#if defined(__GLIBC__)
void *trace[64];
@@ -166,7 +166,7 @@ static sigset_t SetSignals(void(*handler)(int))
*
* @param signum the signal that caused us to crash.
*/
static void CDECL HandleInternalCrash(int signum)
static void CDECL HandleInternalCrash([[maybe_unused]] int signum)
{
if (CrashLogUnix::current == nullptr || !CrashLogUnix::current->try_execute_active) {
fmt::print("Something went seriously wrong when creating the crash log. Aborting.\n");

View File

@@ -95,7 +95,7 @@ FT_Error GetFontByFaceName(const char *font_name, FT_Face *face)
return err;
}
bool SetFallbackFont(FontCacheSettings *settings, const std::string &language_isocode, int winlangid, MissingGlyphSearcher *callback)
bool SetFallbackFont(FontCacheSettings *settings, const std::string &language_isocode, int, MissingGlyphSearcher *callback)
{
bool ret = false;

View File

@@ -59,7 +59,7 @@ bool FiosIsRoot(const std::string &path)
return path == PATHSEP;
}
void FiosGetDrives(FileList &file_list)
void FiosGetDrives(FileList &)
{
return;
}
@@ -199,7 +199,7 @@ void ShowInfoI(const std::string &str)
}
#if !defined(__APPLE__)
void ShowOSErrorBox(const char *buf, bool system)
void ShowOSErrorBox(const char *buf, bool)
{
/* All unix systems, except OSX. Only use escape codes on a TTY. */
if (isatty(fileno(stderr))) {
@@ -251,7 +251,7 @@ void OSOpenBrowser(const char *url)
}
#endif /* __APPLE__ */
void SetCurrentThreadName(const char *threadName) {
void SetCurrentThreadName([[maybe_unused]] const char *threadName) {
#if defined(__GLIBC__)
if (threadName) pthread_setname_np(pthread_self(), threadName);
#endif /* defined(__GLIBC__) */