throw ComponentLoadException("Could not load module");
#ifdef _WIN32
- pCreateComponent = (CreateComponentFunction)GetProcAddress(hModule,
- "CreateComponent");
+ pCreateComponent = reinterpret_cast<CreateComponentFunction>(GetProcAddress(hModule,
+ "CreateComponent"));
#else /* _WIN32 */
- pCreateComponent = (CreateComponentFunction)lt_dlsym(hModule,
- "CreateComponent");
+# ifdef __GNUC__
+ /* suppress compiler warning for void * cast */
+ __extension__
+# endif
+ pCreateComponent = reinterpret_cast<CreateComponentFunction>(lt_dlsym(hModule,
+ "CreateComponent"));
#endif /* _WIN32 */
if (pCreateComponent == NULL)
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>_WINDLL;I2_BASE_BUILD;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <WarningLevel>Level3</WarningLevel>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
- <WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>_WINDLL;I2_BASE_BUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <WarningLevel>Level3</WarningLevel>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
# define HAVE_CXX11
# pragma warning(disable:4251)
# define _CRT_SECURE_NO_DEPRECATE
+# define _CRT_SECURE_NO_WARNINGS
#else /* _MSC_VER */
# include "config.h"
#endif /* _MSC_VER */
*
* Processes errors that have occured for the socket.
*
- * @param ea Event arguments for the socket error.
+ * @param - Event arguments for the socket error.
* @returns 0
*/
-int Socket::ExceptionEventHandler(const EventArgs& ea)
+int Socket::ExceptionEventHandler(const EventArgs&)
{
HandleSocketError();
*
* Processes data that is available for this socket.
*
- * @param ea Event arguments.
+ * @param - Event arguments.
* @returns 0
*/
-int TCPClient::ReadableEventHandler(const EventArgs& ea)
+int TCPClient::ReadableEventHandler(const EventArgs&)
{
int rc;
*
* Processes data that can be written for this socket.
*
- * @param ea Event arguments.
+ * @param - Event arguments.
* @returns 0
*/
-int TCPClient::WritableEventHandler(const EventArgs& ea)
+int TCPClient::WritableEventHandler(const EventArgs&)
{
int rc;
* Accepts a new client and creates a new client object for it
* using the client factory function.
*
- * @param ea Event arguments.
+ * @param - Event arguments.
* @returns 0
*/
-int TCPServer::ReadableEventHandler(const EventArgs& ea)
+int TCPServer::ReadableEventHandler(const EventArgs&)
{
int fd;
sockaddr_storage addr;
* Constructor for the thread class. Creates a new thread that begins
* executing immediately.
*/
-Thread::Thread(ThreadProc callback)
+Thread::Thread(ThreadProc callback, void *param)
{
threadparam_t *tparam = new threadparam_t();
if (tparam == NULL)
throw OutOfMemoryException("Out of memory");
+ tparam->callback = callback;
+ tparam->param = param;
+
#ifdef _WIN32
m_Thread = CreateThread(NULL, 0, ThreadStartProc, tparam, CREATE_SUSPENDED, NULL);
#endif
public:
- Thread(ThreadProc callback);
+ Thread(ThreadProc callback, void *param);
~Thread(void);
void Join(void);
*
* Processes data that is available for this socket.
*
- * @param ea Event arguments.
+ * @param - Event arguments.
* @returns 0
*/
-int TLSClient::ReadableEventHandler(const EventArgs& ea)
+int TLSClient::ReadableEventHandler(const EventArgs&)
{
int rc;
*
* Processes data that can be written for this socket.
*
- * @param ea Event arguments.
+ * @param - Event arguments.
* @returns 0
*/
-int TLSClient::WritableEventHandler(const EventArgs& ea)
+int TLSClient::WritableEventHandler(const EventArgs&)
{
int rc;
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <WarningLevel>Level3</WarningLevel>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
- <WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <WarningLevel>Level3</WarningLevel>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <WarningLevel>Level3</WarningLevel>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
- <WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <WarningLevel>Level3</WarningLevel>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;CONFIGCOMPONENT_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <WarningLevel>Level3</WarningLevel>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
- <WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;CONFIGCOMPONENT_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <WarningLevel>Level3</WarningLevel>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;DEMO_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <WarningLevel>Level3</WarningLevel>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
- <WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;DEMO_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <WarningLevel>Level3</WarningLevel>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
*
* Periodically sends a demo::HelloWorld message.
*
- * @param tea Event arguments for the timer.
+ * @param - Event arguments for the timer.
* @returns 0
*/
-int DemoComponent::DemoTimerHandler(const TimerEventArgs& tea)
+int DemoComponent::DemoTimerHandler(const TimerEventArgs&)
{
Application::Log("Sending multicast 'hello world' message.");
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;DISCOVERY_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <WarningLevel>Level3</WarningLevel>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
- <WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;DISCOVERY_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <WarningLevel>Level3</WarningLevel>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;I2_ICINGALAUNCHER_BUILD;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <WarningLevel>Level3</WarningLevel>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
- <WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;I2_ICINGALAUNCHER_BUILD;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <WarningLevel>Level3</WarningLevel>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;I2_ICINGA_BUILD;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <WarningLevel>Level3</WarningLevel>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
- <WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;I2_ICINGA_BUILD;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <WarningLevel>Level3</WarningLevel>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
return 0;
}
-int IcingaApplication::DeletedIcingaConfigHandler(const EventArgs& ea)
+int IcingaApplication::DeletedIcingaConfigHandler(const EventArgs&)
{
throw Exception("Unsupported operation.");
-
- return 0;
}
void IcingaApplication::SetPrivateKeyFile(string privkey)
return 0;
}
-int JsonRpcEndpoint::ClientClosedHandler(const EventArgs& ea)
+int JsonRpcEndpoint::ClientClosedHandler(const EventArgs&)
{
Application::Log("Lost connection to endpoint: identity=" + GetIdentity());
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;I2_JSONRPC_BUILD;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <WarningLevel>Level3</WarningLevel>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
- <WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;I2_JSONRPC_BUILD;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <WarningLevel>Level3</WarningLevel>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
Netstring::WriteMessageToFIFO(GetSendQueue(), message);
}
-int JsonRpcClient::DataAvailableHandler(const EventArgs& ea)
+int JsonRpcClient::DataAvailableHandler(const EventArgs&)
{
- while (true) {
+ for (;;) {
try {
Message message;
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <WarningLevel>Level3</WarningLevel>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
- <WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <WarningLevel>Level3</WarningLevel>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>