silence picky gcc errors

This commit is contained in:
Michiharu Ariza 2018-11-30 15:15:31 -08:00
parent 9ae954f43a
commit 23a797b443
1 changed files with 2 additions and 2 deletions

View File

@ -1028,7 +1028,7 @@ struct cff1
{ fini (); return; } { fini (); return; }
{ /* parse top dict */ { /* parse top dict */
const ByteStr topDictStr = (*topDictIndex)[0]; const ByteStr topDictStr = (*topDictIndex)[static_cast<unsigned int>(0)];
if (unlikely (!topDictStr.sanitize (&sc))) { fini (); return; } if (unlikely (!topDictStr.sanitize (&sc))) { fini (); return; }
CFF1TopDict_Interpreter top_interp; CFF1TopDict_Interpreter top_interp;
top_interp.env.init (topDictStr); top_interp.env.init (topDictStr);
@ -1112,7 +1112,7 @@ struct cff1
else /* non-CID */ else /* non-CID */
{ {
CFF1TopDictValues *font = &topDict; CFF1TopDictValues *font = &topDict;
PRIVDICTVAL *priv = &privateDicts[0]; PRIVDICTVAL *priv = &privateDicts[static_cast<unsigned int>(0)];
const ByteStr privDictStr (StructAtOffset<UnsizedByteStr> (cff, font->privateDictInfo.offset), font->privateDictInfo.size); const ByteStr privDictStr (StructAtOffset<UnsizedByteStr> (cff, font->privateDictInfo.offset), font->privateDictInfo.size);
if (unlikely (!privDictStr.sanitize (&sc))) { fini (); return; } if (unlikely (!privDictStr.sanitize (&sc))) { fini (); return; }