Added "/analyze" flag for compile in order to activate Code Analysis in Visual Studio 2008+. Resolved some of these warnings.

This commit is contained in:
Sorin Sbarnea 2009-12-21 16:52:47 +00:00
parent ba7ec582c3
commit 9face38556
12 changed files with 1419 additions and 1381 deletions

View file

@ -370,7 +370,7 @@ CMSWindowsScreen::openScreensaver(bool notify)
if (m_screensaverNotify) {
m_desks->installScreensaverHooks(true);
}
else {
else if (m_screensaver) {
m_screensaver->disable();
}
}
@ -393,6 +393,7 @@ void
CMSWindowsScreen::screensaver(bool activate)
{
assert(m_screensaver != NULL);
if (m_screensaver==NULL) return;
if (activate) {
m_screensaver->activate();
@ -836,6 +837,10 @@ void
CMSWindowsScreen::sendClipboardEvent(CEvent::Type type, ClipboardID id)
{
CClipboardInfo* info = (CClipboardInfo*)malloc(sizeof(CClipboardInfo));
if(info == NULL) {
LOG((CLOG_ERR "malloc failed on %s:%s", __FILE__, __LINE__ ));
return;
}
info->m_id = id;
info->m_sequenceNumber = m_sequenceNumber;
sendEvent(type, info);