Skip to content

Commit

Permalink
Remove pragma
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephane Gouache committed Sep 27, 2024
1 parent d1085b2 commit 4241357
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
5 changes: 2 additions & 3 deletions test/path_helper.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "path_helper.h"

#if defined(_WIN32)
#pragma warning(disable : 4514 4710 4711)
#include <Shlwapi.h>
#include <io.h>
#include <windows.h>
Expand Down Expand Up @@ -37,8 +36,8 @@ std::string getExecutablePath() {

std::string getExecutableDir() {
std::string executablePath = getExecutablePath();
char *exePath = new char[executablePath.length()];
strcpy(exePath, executablePath.c_str());
char *exePath = new char[executablePath.length() + 1];
strncpy(exePath, executablePath.c_str(), executablePath.length() + 1);
PathRemoveFileSpec(exePath);
std::string directory = std::string(exePath);
delete[] exePath;
Expand Down
1 change: 0 additions & 1 deletion test/plugin_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include <limits.h>
#include <unistd.h>
#else
#pragma warning(disable : 4514 4710 4711)
#include <windows.h>
#include "errhandlingapi.h"
#endif
Expand Down

0 comments on commit 4241357

Please sign in to comment.