mirror of
https://github.com/Serial-Studio/Serial-Studio.git
synced 2025-01-15 05:22:53 +08:00
Try to fix MSVC build warnings
This commit is contained in:
parent
c323133082
commit
5bdb1cdf5b
@ -126,6 +126,7 @@ if(PRODUCTION_OPTIMIZATION)
|
|||||||
/OPT:REF # Remove unreferenced functions/data
|
/OPT:REF # Remove unreferenced functions/data
|
||||||
/OPT:ICF # Remove identical COMDATs
|
/OPT:ICF # Remove identical COMDATs
|
||||||
/LTCG # Enable LTO during linkingn
|
/LTCG # Enable LTO during linkingn
|
||||||
|
/NODEFAULTLIB:msvcrt.lib # Exclude dynamic runtime
|
||||||
)
|
)
|
||||||
|
|
||||||
# macOS-specific settings
|
# macOS-specific settings
|
||||||
|
@ -252,8 +252,8 @@ static void attachToConsole()
|
|||||||
{
|
{
|
||||||
if (AttachConsole(ATTACH_PARENT_PROCESS))
|
if (AttachConsole(ATTACH_PARENT_PROCESS))
|
||||||
{
|
{
|
||||||
(void)freopen("CONOUT$", "w", stdout);
|
(void)freopen_s(nullptr, "CONOUT$", "w", stdout);
|
||||||
(void)freopen("CONOUT$", "w", stderr);
|
(void)freopen_s(nullptr, "CONOUT$", "w", stderr);
|
||||||
printf("\n");
|
printf("\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -280,7 +280,7 @@ static char **adjustArgumentsForFreeType(int &argc, char **argv)
|
|||||||
|
|
||||||
// Copy original argv into newArgv
|
// Copy original argv into newArgv
|
||||||
for (int i = 0; i < argc; ++i)
|
for (int i = 0; i < argc; ++i)
|
||||||
newArgv[i] = strdup(argv[i]);
|
newArgv[i] = _strdup(argv[i]);
|
||||||
|
|
||||||
// Add new arguments to the end
|
// Add new arguments to the end
|
||||||
newArgv[argc] = const_cast<char *>(platformArgument);
|
newArgv[argc] = const_cast<char *>(platformArgument);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user