summaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/copynpaste.cpp4
-rw-r--r--src/utils/mkdir.cpp2
-rw-r--r--src/utils/paths.cpp2
-rw-r--r--src/utils/process.cpp6
4 files changed, 7 insertions, 7 deletions
diff --git a/src/utils/copynpaste.cpp b/src/utils/copynpaste.cpp
index a53e0b63f..1d2289600 100644
--- a/src/utils/copynpaste.cpp
+++ b/src/utils/copynpaste.cpp
@@ -106,7 +106,7 @@ bool sendBuffer(std::string& text)
MultiByteToWideChar(CP_UTF8, 0, text.c_str(), -1, out, wCharsLen);
- if (!OpenClipboard(0))
+ if (!OpenClipboard(nullptr))
{
GlobalUnlock(h);
GlobalFree(h);
@@ -284,7 +284,7 @@ bool sendBuffer(std::string& text)
return false;
}
-#elif USE_X11
+#elif defined USE_X11
#include <unistd.h>
diff --git a/src/utils/mkdir.cpp b/src/utils/mkdir.cpp
index 5eb1b0388..4632bec84 100644
--- a/src/utils/mkdir.cpp
+++ b/src/utils/mkdir.cpp
@@ -90,7 +90,7 @@ int mkdir_r(const char *pathname)
return -1;
}
- if (!CreateDirectory(tmp2, 0))
+ if (!CreateDirectory(tmp2, nullptr))
{
// hack, hack. just assume that x: might be a drive
// letter, and try again
diff --git a/src/utils/paths.cpp b/src/utils/paths.cpp
index 7cb600a1a..1a2ec1b5c 100644
--- a/src/utils/paths.cpp
+++ b/src/utils/paths.cpp
@@ -145,7 +145,7 @@ std::string getDesktopDir()
if (dir.empty())
dir = getSpecialFolderLocation(CSIDL_DESKTOP);
return dir;
-#elif USE_X11
+#elif defined USE_X11
char *xdg = getenv("XDG_CONFIG_HOME");
std::string file;
if (!xdg)
diff --git a/src/utils/process.cpp b/src/utils/process.cpp
index 0106c597d..2d64f3a37 100644
--- a/src/utils/process.cpp
+++ b/src/utils/process.cpp
@@ -37,7 +37,7 @@ const int timeOut = 10;
#include <windows.h>
-int execFile(std::string pathName, std::string name,
+int execFile(std::string pathName, std::string name A_UNUSED,
std::string arg1, std::string arg2, int waitTime)
{
if (!waitTime)
@@ -53,8 +53,8 @@ int execFile(std::string pathName, std::string name,
if (!arg2.empty())
args += " " + arg2;
- if (CreateProcess(pathName.c_str(), (char*)args.c_str(), 0, 0, false,
- CREATE_DEFAULT_ERROR_MODE, 0, 0, &siStartupInfo,
+ if (CreateProcess(pathName.c_str(), (char*)args.c_str(), nullptr, nullptr,
+ false, CREATE_DEFAULT_ERROR_MODE, nullptr, nullptr, &siStartupInfo,
&piProcessInfo) != false)
{
if (!WaitForSingleObject(piProcessInfo.hProcess, timeOut * 1000))