Merge branch 'V5-5-patches' into V5-6-patches

* V5-5-patches:
  Remove C99 length specifier 'z' and use a cast instead