Kaydet (Commit) 2f46a7d1 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

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
üst 721cbf44
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment