[clang,tidy] fix warnings

This commit is contained in:
akallabeth
2025-01-14 23:32:13 +01:00
committed by Armin Novak
parent 87e6ceca98
commit ea2022b76b
42 changed files with 145 additions and 118 deletions

View File

@@ -52,6 +52,7 @@ static const char* strsignal(int signum)
// NOLINTBEGIN(bugprone-signal-handler,cert-msc54-cpp,cert-sig30-c)
static void cleanup_handler(int signum)
{
// NOLINTNEXTLINE(concurrency-mt-unsafe)
WLog_INFO(TAG, "caught signal %s [%d], starting cleanup...", strsignal(signum), signum);
WLog_INFO(TAG, "stopping all connections.");

View File

@@ -997,8 +997,12 @@ static int x11_shadow_subsystem_base_init(x11ShadowSubsystem* subsystem)
if (subsystem->display)
return 1; /* initialize once */
// NOLINTNEXTLINE(concurrency-mt-unsafe)
if (!getenv("DISPLAY"))
{
// NOLINTNEXTLINE(concurrency-mt-unsafe)
setenv("DISPLAY", ":0", 1);
}
if (!XInitThreads())
return -1;
@@ -1196,8 +1200,12 @@ UINT32 x11_shadow_enum_monitors(MONITOR_DEF* monitors, UINT32 maxMonitors)
int displayHeight = 0;
int numMonitors = 0;
// NOLINTNEXTLINE(concurrency-mt-unsafe)
if (!getenv("DISPLAY"))
{
// NOLINTNEXTLINE(concurrency-mt-unsafe)
setenv("DISPLAY", ":0", 1);
}
display = XOpenDisplay(NULL);