add Wextra and Werror in gn args

1. add -Wextra and -Werror to check code format error
2. modify all compiler error

issue: https://gitee.com/openharmony/ark_js_runtime/issues/I4ZDQE

Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
Change-Id: If5fdd1980494269b4c06bf1bb38a8eba7952adea
This commit is contained in:
wengchangcheng
2022-03-24 15:04:57 +08:00
parent 47aaa2cace
commit 4804cd80d3
124 changed files with 1273 additions and 1439 deletions
+1 -2
View File
@@ -535,7 +535,7 @@ JSHandle<JSHClass> JSFunction::GetInstanceJSHClass(JSThread *thread, JSHandle<JS
if (newTargetFunc->IsDerivedConstructor()) {
JSTaggedValue newTargetProto = JSHandle<JSObject>::Cast(newTarget)->GetPrototype(thread);
if (newTargetProto == constructor.GetTaggedValue()) {
return GetOrCreateDerivedJSHClass(thread, newTargetFunc, constructor, ctorInitialJSHClass);
return GetOrCreateDerivedJSHClass(thread, newTargetFunc, ctorInitialJSHClass);
}
}
}
@@ -570,7 +570,6 @@ JSHandle<JSHClass> JSFunction::GetInstanceJSHClass(JSThread *thread, JSHandle<JS
}
JSHandle<JSHClass> JSFunction::GetOrCreateDerivedJSHClass(JSThread *thread, JSHandle<JSFunction> derived,
JSHandle<JSFunction> constructor,
JSHandle<JSHClass> ctorInitialJSHClass)
{
JSTaggedValue protoOrDyn(derived->GetProtoOrDynClass());