issue #3304
 1.fix redeclaration of ‘int length’.
 2.fix expected ‘)’ before ‘;’ token.