Skip to content

Commit ce6df6c

Browse files
committed
Fix MSVC warnings
1 parent c966cf5 commit ce6df6c

5 files changed

Lines changed: 7 additions & 5 deletions

File tree

Source/AutoUpdater.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ static void runInstaller (const File& targetFile)
468468
{
469469
auto returnCode = ShellExecute (NULL, (LPCSTR) "runas", targetFile.getFullPathName().toRawUTF8(), NULL, NULL, SW_SHOW);
470470

471-
if ((int) returnCode > 31)
471+
if ((intptr_t) returnCode > 31)
472472
JUCEApplication::getInstance()->systemRequestedQuit();
473473
else
474474
LOGE ("Failed to run the installer: ", GetLastError());

Source/Processors/PluginManager/PluginManager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,7 @@ bool PluginManager::removePlugin (String libName)
592592
{
593593
ERROR_MSG ("Failed to load function 'getPluginInfo'");
594594
closeHandle (lib.handle);
595-
return -1;
595+
return false;
596596
}
597597

598598
Plugin::PluginInfo pInfo;

Source/Processors/RecordNode/BinaryFormat/FileMemoryBlock.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class FileMemoryBlock
3535

3636
~FileMemoryBlock()
3737
{
38-
if (~m_flushed)
38+
if (!m_flushed)
3939
{
4040
m_file->write (m_data, m_finalFlushSamples * sizeof (StorageType));
4141
}

Source/Processors/Serial/ofConstants.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@
4040
#define WIN32_LEAN_AND_MEAN
4141

4242
#if (_MSC_VER)
43+
#ifndef NOMINMAX
4344
#define NOMINMAX
45+
#endif
4446
//http://stackoverflow.com/questions/1904635/warning-c4003-and-errors-c2589-and-c2059-on-x-stdnumeric-limitsintmax
4547
#endif
4648

Source/Processors/Settings/EventChannel.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,9 @@ void EventChannel::setLineState (int line, bool state)
116116
if (line < 64)
117117
{
118118
if (state)
119-
m_TTLWord |= (1UL << line);
119+
m_TTLWord |= (1ULL << line);
120120
else
121-
m_TTLWord &= ~(1UL << line);
121+
m_TTLWord &= ~(1ULL << line);
122122
}
123123
}
124124

0 commit comments

Comments
 (0)