fixed: osx106 warnings
This commit is contained in:
parent
228befdc2c
commit
8d6a44d1b7
|
@ -155,7 +155,4 @@ enum {
|
|||
kExitConfig = 4 // cannot read configuration
|
||||
};
|
||||
|
||||
// gnu 4.6+ has pragma diagnostic push and tautological-compare
|
||||
#define GNUC_46 defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
|
||||
|
||||
#endif
|
||||
|
|
|
@ -19,24 +19,7 @@
|
|||
|
||||
#include "ECryptoMode.h"
|
||||
#include "CString.h"
|
||||
|
||||
#if __APPLE__
|
||||
# if GNUC_46
|
||||
# pragma GCC diagnostic push
|
||||
# pragma GCC diagnostic ignored "-Wtautological-compare"
|
||||
# endif
|
||||
# pragma GCC diagnostic ignored "-Wall"
|
||||
#endif
|
||||
|
||||
#include <cryptopp562/gcm.h>
|
||||
#include <cryptopp562/modes.h>
|
||||
#include <cryptopp562/aes.h>
|
||||
|
||||
#if __APPLE__
|
||||
# if GNUC_46
|
||||
# pragma GCC diagnostic pop
|
||||
# endif
|
||||
#endif
|
||||
#include "CCryptoMode_cryptopp.h"
|
||||
|
||||
//! Encapsulation of modes
|
||||
/*!
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
/*
|
||||
* synergy -- mouse and keyboard sharing utility
|
||||
* Copyright (C) 2014 Bolton Software Ltd.
|
||||
*
|
||||
* This package is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* found in the file COPYING that should have accompanied this file.
|
||||
*
|
||||
* This package is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
// HACK: gcc on osx106 doesn't give you an easy way to hide warnings
|
||||
// from included headers, so use the system_header pragma. the downside
|
||||
// is that everything in the header file following this also has warnings
|
||||
// ignored, so we need to put it in a separate header file.
|
||||
#if __APPLE__
|
||||
# pragma GCC system_header
|
||||
#endif
|
||||
|
||||
#include <cryptopp562/gcm.h>
|
||||
#include <cryptopp562/modes.h>
|
||||
#include <cryptopp562/aes.h>
|
|
@ -60,7 +60,7 @@ CCryptoStream::read(void* out, UInt32 n)
|
|||
LOG((CLOG_DEBUG4 "crypto: read %i (decrypt)", n));
|
||||
|
||||
byte* cypher = new byte[n];
|
||||
int result = getStream()->read(cypher, n);
|
||||
size_t result = getStream()->read(cypher, n);
|
||||
if (result == 0) {
|
||||
// nothing to read.
|
||||
return 0;
|
||||
|
|
|
@ -20,22 +20,7 @@
|
|||
#include "BasicTypes.h"
|
||||
#include "CStreamFilter.h"
|
||||
#include "CCryptoMode.h"
|
||||
|
||||
#if __APPLE__
|
||||
# if GNUC_46
|
||||
# pragma GCC diagnostic push
|
||||
# endif
|
||||
# pragma GCC diagnostic ignored "-Wall"
|
||||
#endif
|
||||
|
||||
#include <cryptopp562/osrng.h>
|
||||
#include <cryptopp562/sha.h>
|
||||
|
||||
#if __APPLE__
|
||||
# if GNUC_46
|
||||
# pragma GCC diagnostic pop
|
||||
# endif
|
||||
#endif
|
||||
#include "CCryptoStream_cryptopp.h"
|
||||
|
||||
class CCryptoOptions;
|
||||
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
/*
|
||||
* synergy -- mouse and keyboard sharing utility
|
||||
* Copyright (C) 2014 Bolton Software Ltd.
|
||||
*
|
||||
* This package is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* found in the file COPYING that should have accompanied this file.
|
||||
*
|
||||
* This package is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
// HACK: gcc on osx106 doesn't give you an easy way to hide warnings
|
||||
// from included headers, so use the system_header pragma. the downside
|
||||
// is that everything in the header file following this also has warnings
|
||||
// ignored, so we need to put it in a separate header file.
|
||||
#if __APPLE__
|
||||
# pragma GCC system_header
|
||||
#endif
|
||||
|
||||
#include <cryptopp562/osrng.h>
|
||||
#include <cryptopp562/sha.h>
|
|
@ -2100,9 +2100,6 @@ COSXScreen::getDraggingFilename()
|
|||
return m_draggingFilename;
|
||||
}
|
||||
|
||||
#if GNUC_46
|
||||
# pragma GCC diagnostic push
|
||||
#endif
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
|
||||
void
|
||||
|
@ -2143,6 +2140,4 @@ avoidHesitatingCursor()
|
|||
CGSetLocalEventsSuppressionInterval(0.0001);
|
||||
}
|
||||
|
||||
#if GNUC_46
|
||||
# pragma GCC diagnostic pop
|
||||
#endif
|
||||
#pragma GCC diagnostic error "-Wdeprecated-declarations"
|
||||
|
|
|
@ -161,9 +161,6 @@ COSXScreenSaver::launchTerminationCallback(
|
|||
return (CallNextEventHandler(nextHandler, theEvent));
|
||||
}
|
||||
|
||||
#if GNUC_46
|
||||
# pragma GCC diagnostic push
|
||||
#endif
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
|
||||
void
|
||||
|
@ -199,6 +196,4 @@ testProcessName(const char* name, const ProcessSerialNumber& psn)
|
|||
return (err == 0 && CFEqual(CFSTR("ScreenSaverEngine"), processName));
|
||||
}
|
||||
|
||||
#if GNUC_46
|
||||
# pragma GCC diagnostic pop
|
||||
#endif
|
||||
#pragma GCC diagnostic error "-Wdeprecated-declarations"
|
||||
|
|
|
@ -28,7 +28,7 @@ CDragInformation::parseDragInfo(CDragFileList& dragFileList, UInt32 fileNum, CSt
|
|||
size_t findResult2 = 0;
|
||||
dragFileList.clear();
|
||||
CString slash("\\");
|
||||
if (data.find("/", startPos) != -1) {
|
||||
if (data.find("/", startPos) != string::npos) {
|
||||
slash = "/";
|
||||
}
|
||||
|
||||
|
@ -51,9 +51,9 @@ CDragInformation::parseDragInfo(CDragFileList& dragFileList, UInt32 fileNum, CSt
|
|||
CString
|
||||
CDragInformation::getDragFileExtension(CString fileName)
|
||||
{
|
||||
size_t findResult = -1;
|
||||
size_t findResult = string::npos;
|
||||
findResult = fileName.find_last_of(".", fileName.size());
|
||||
if (findResult != -1) {
|
||||
if (findResult != string::npos) {
|
||||
return fileName.substr(findResult + 1, fileName.size() - findResult - 1);
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
* synergy -- mouse and keyboard sharing utility
|
||||
* Copyright (C) 2014 Bolton Software Ltd.
|
||||
*
|
||||
* This package is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* found in the file COPYING that should have accompanied this file.
|
||||
*
|
||||
* This package is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
// HACK: gcc on osx106 doesn't give you an easy way to hide warnings
|
||||
// from included headers, so use the system_header pragma. the downside
|
||||
// is that everything in the header file following this also has warnings
|
||||
// ignored, so we need to put it in a separate header file.
|
||||
#if __APPLE__
|
||||
# pragma GCC system_header
|
||||
#endif
|
||||
|
||||
#include <gtest/gtest.h>
|
|
@ -16,7 +16,7 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <../../gtest.h>
|
||||
#include "CClipboard.h"
|
||||
|
||||
TEST(CClipboardTests, empty_openCalled_returnsTrue)
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <../../gtest.h>
|
||||
#include <gmock/gmock.h>
|
||||
#include "CKeyStateTests.h"
|
||||
#include "CMockEventQueue.h"
|
||||
|
|
Loading…
Reference in New Issue