silence & fix new warnings

pull/1113/head
Michiharu Ariza 6 years ago
parent eed7e6bbc8
commit 35b64dfb57
  1. 3
      src/hb-cff-interp-dict-common.hh
  2. 9
      src/hb-cff1-interp-cs.hh
  3. 4
      src/hb-ot-cff-common.hh
  4. 4
      src/hb-subset-cff1.cc
  5. 4
      src/hb-subset-cff2.cc

@ -210,7 +210,8 @@ struct DictOpSet : OpSet<Number>
case EXP_NEG:
exp_neg = true;
/* NO BREAK */
HB_FALLTHROUGH;
case EXP_POS:
if (part == EXP_PART) return false;
part = EXP_PART;

@ -145,8 +145,9 @@ struct CFF1CSOpSet : CSOpSet<Number, OPSET, CFF1CSInterpEnv, PARAM, PATH>
}
break;
case OpCode_random:
if (unlikely (!env.argStack.check_overflow (1))) return false;
env.argStack.push_int (1); /* we can't deal with random behavior; make it constant */
if (unlikely (!env.argStack.check_overflow (1))) return false;
env.argStack.push_int (1); /* we can't deal with random behavior; make it constant */
break;
case OpCode_mul:
if (unlikely (!env.argStack.check_pop_num2 (n1, n2))) return false;
env.argStack.push_real (n1.to_real() * n2.to_real());
@ -170,7 +171,7 @@ struct CFF1CSOpSet : CSOpSet<Number, OPSET, CFF1CSInterpEnv, PARAM, PATH>
if (unlikely (!env.argStack.check_pop_num (n1))) return false;
int i = n1.to_int ();
if (i < 0) i = 0;
if (unlikely (i >= env.argStack.get_count () || !env.argStack.check_overflow (1))) return false;
if (unlikely ((unsigned int)i >= env.argStack.get_count () || !env.argStack.check_overflow (1))) return false;
env.argStack.push (env.argStack[env.argStack.get_count () - i - 1]);
}
break;
@ -179,7 +180,7 @@ struct CFF1CSOpSet : CSOpSet<Number, OPSET, CFF1CSInterpEnv, PARAM, PATH>
if (unlikely (!env.argStack.check_pop_num2 (n1, n2))) return false;
int n = n1.to_int ();
int j = n2.to_int ();
if (unlikely (n < 0 || n > env.argStack.get_count ())) return false;
if (unlikely (n < 0 || (unsigned int)n > env.argStack.get_count ())) return false;
if (likely (n > 0))
{
if (j < 0)

@ -138,7 +138,7 @@ struct CFFIndex
}
}
inline const unsigned int offset_at (unsigned int index) const
inline unsigned int offset_at (unsigned int index) const
{
assert (index <= count);
const HBUINT8 *p = offsets + offSize * index;
@ -149,7 +149,7 @@ struct CFFIndex
return offset;
}
inline const unsigned int length_at (unsigned int index) const
inline unsigned int length_at (unsigned int index) const
{ return offset_at (index + 1) - offset_at (index); }
inline const char *data_base (void) const

@ -293,8 +293,8 @@ struct CFF1CSOpSet_Flatten : CFF1CSOpSet<CFF1CSOpSet_Flatten, FlattenParam>
env.clear_args ();
return;
}
/* NO BREAK */
HB_FALLTHROUGH;
default:
SUPER::flush_args_and_op (op, env, param, start_arg);
break;

@ -101,8 +101,8 @@ struct CFF2CSOpSet_Flatten : CFF2CSOpSet<CFF2CSOpSet_Flatten, FlattenParam>
env.clear_args ();
return;
}
/* NO BREAK */
HB_FALLTHROUGH;
default:
SUPER::flush_args_and_op (op, env, param, start_arg);
break;

Loading…
Cancel
Save