Bug 826983 - Enable FAIL_ON_WARNINGS on MSVC in editor/. r=ehsan

This commit is contained in:
Masatoshi Kimura 2013-01-07 04:41:46 +09:00
parent 7adf3271d1
commit 238cc58022
4 changed files with 11 additions and 15 deletions

View File

@ -16,9 +16,7 @@ EXPORT_LIBRARY = 1
IS_COMPONENT = 1
MODULE_NAME = nsComposerModule
LIBXUL_LIBRARY = 1
ifndef _MSC_VER
FAIL_ON_WARNINGS = 1
endif # !_MSC_VER
CPPSRCS = \

View File

@ -247,12 +247,12 @@ void nsComposerCommandsUpdater::TimerCallback()
{
// if the selection state has changed, update stuff
bool isCollapsed = SelectionIsCollapsed();
if (isCollapsed != mSelectionCollapsed)
if (static_cast<int8_t>(isCollapsed) != mSelectionCollapsed)
{
UpdateCommandGroup(NS_LITERAL_STRING("select"));
mSelectionCollapsed = isCollapsed;
}
// isn't this redundant with the UpdateCommandGroup above?
// can we just nuke the above call? or create a meta command group?
UpdateCommandGroup(NS_LITERAL_STRING("style"));
@ -261,14 +261,14 @@ void nsComposerCommandsUpdater::TimerCallback()
nsresult
nsComposerCommandsUpdater::UpdateDirtyState(bool aNowDirty)
{
if (mDirtyState != aNowDirty)
if (mDirtyState != static_cast<int8_t>(aNowDirty))
{
UpdateCommandGroup(NS_LITERAL_STRING("save"));
UpdateCommandGroup(NS_LITERAL_STRING("undo"));
mDirtyState = aNowDirty;
}
return NS_OK;
return NS_OK;
}
nsresult

View File

@ -15,9 +15,7 @@ TEST_DIRS += tests
MODULE = editor
LIBRARY_NAME = editorbase_s
LIBXUL_LIBRARY = 1
ifndef _MSC_VER
FAIL_ON_WARNINGS = 1
endif # !_MSC_VER
# Internal header files, needed by other editor sublibs:

View File

@ -2606,18 +2606,18 @@ nsEditor::NotifyDocumentListeners(TDocumentListenerNotification aNotificationTyp
break;
}
break;
case eDocumentStateChanged:
{
bool docIsDirty;
rv = GetDocumentModified(&docIsDirty);
NS_ENSURE_SUCCESS(rv, rv);
if (docIsDirty == mDocDirtyState)
if (static_cast<int8_t>(docIsDirty) == mDocDirtyState)
return NS_OK;
mDocDirtyState = (int8_t)docIsDirty;
mDocDirtyState = docIsDirty;
for (i = 0; i < numListeners;i++)
{
rv = listeners[i]->NotifyDocumentStateChanged(mDocDirtyState);