sw/inc/toxe.hxx |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 2f46a7d1b255232b979b4fcca02e25b09edf949e
Author: Stephan Bergmann <sberg...@redhat.com>
Date:   Thu Nov 17 17:08:52 2016 +0100

    Avoid -fsanitize=enum
    
    ...when doing Writer "Insert - Table of Contents and Index - Table of 
Contents,
    Index or Bibliography...":
    
    > sw/source/uibase/inc/cnttab.hxx:58:16: runtime error: load of value 
65535, which is not a valid value for type 'TOXTypes'
    >     #0 0x7fbed9c2c9c8 in CurTOXType::operator==(CurTOXType const&) 
sw/source/uibase/inc/cnttab.hxx:58:16
    >     #1 0x7fbed9b711b1 in SwTOXEntryTabPage::ActivatePage(SfxItemSet 
const&) sw/source/ui/index/cnttab.cxx:2071:25
    >     #2 0x7fc217524056 in SfxTabDialog::ActivatePageHdl(TabControl*) 
sfx2/source/dialog/tabdlg.cxx:1126:19
    >     #3 0x7fc217519ac3 in SfxTabDialog::LinkStubActivatePageHdl(void*, 
TabControl*) sfx2/source/dialog/tabdlg.cxx:1035:1
    >     #4 0x7fc1f15c0e37 in Link<TabControl*, void>::Call(TabControl*) const 
include/tools/link.hxx:84:45
    >     #5 0x7fc1f157cbaa in TabControl::ActivatePage() 
vcl/source/control/tabctrl.cxx:1601:19
    
    Change-Id: I458e010b10dfdf3e944c389f61595869cc41036f

diff --git a/sw/inc/toxe.hxx b/sw/inc/toxe.hxx
index 5bf5c9d5..417cc10 100644
--- a/sw/inc/toxe.hxx
+++ b/sw/inc/toxe.hxx
@@ -33,7 +33,10 @@ enum SwTOIKeyType
     TOI_SECONDARY
 };
 
-enum TOXTypes
+// Somewhat redundantly fix TOXType's underlying type to int, so that
+// SwTOXEntryTabPage (sw/source/ui/index/cnttab.cxx) can initialize
+// aLastTOXType.eType to (TOXTypes)USHRT_MAX without causing -fsanitize=enum:
+enum TOXTypes: int
 {
     TOX_INDEX,
     TOX_USER,
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to