external/libmspub: Work around -fsanitize=enum

Change-Id: Icf1d45b1cd171e868a15f841258c5368a0b213e1
This commit is contained in:
Stephan Bergmann 2015-01-13 11:13:40 +01:00
parent fcfa399067
commit 7340bec472
2 changed files with 18 additions and 0 deletions

View file

@ -11,4 +11,10 @@ $(eval $(call gb_UnpackedTarball_UnpackedTarball,libmspub))
$(eval $(call gb_UnpackedTarball_set_tarball,libmspub,$(MSPUB_TARBALL)))
$(eval $(call gb_UnpackedTarball_set_patchlevel,libmspub,0))
$(eval $(call gb_UnpackedTarball_add_patches,libmspub,\
external/libmspub/ubsan.patch \
))
# vim: set noet sw=4 ts=4:

12
external/libmspub/ubsan.patch vendored Normal file
View file

@ -0,0 +1,12 @@
--- src/lib/MSPUBContentChunkType.h
+++ src/lib/MSPUBContentChunkType.h
@@ -27,7 +27,8 @@
CELLS = 0x63,
FONT = 0x6C,
IMAGE_2K, //these don't exist in Pub 2k3 so their value in the enum is not used.
- IMAGE_2K_DATA
+ IMAGE_2K_DATA,
+ MSPUBContentChunkType_dummy=0xFF // MSPUBParser.cpp:2359:9: runtime error: load of value 138, which is not a valid value for type 'libmspub::MSPUBContentChunkType'
};
} // namespace libmspub