mirror of https://github.com/arendst/Tasmota.git
Berry suppress warnings (#18626)
This commit is contained in:
parent
11631cdb19
commit
c4d90d4636
|
@ -40,10 +40,10 @@ int be_re_compile(bvm *vm) {
|
|||
int32_t argc = be_top(vm); // Get the number of arguments
|
||||
if (argc >= 1 && be_isstring(vm, 1)) {
|
||||
const char * regex_str = be_tostring(vm, 1);
|
||||
int sz = re1_5_sizecode(regex_str);
|
||||
if (sz < 0) {
|
||||
int sz = re1_5_sizecode(regex_str);
|
||||
if (sz < 0) {
|
||||
be_raise(vm, "internal_error", "error in regex");
|
||||
}
|
||||
}
|
||||
|
||||
ByteProg *code = be_os_malloc(sizeof(ByteProg) + sz);
|
||||
int ret = re1_5_compilecode(code, regex_str);
|
||||
|
@ -107,10 +107,10 @@ int be_re_match_search(bvm *vm, bbool is_anchored, bbool size_only) {
|
|||
if (offset >= hay_len) { be_return_nil(vm); } // any match of empty string returns nil, this catches implicitly when hay_len == 0
|
||||
hay += offset; // shift to offset
|
||||
|
||||
int sz = re1_5_sizecode(regex_str);
|
||||
if (sz < 0) {
|
||||
int sz = re1_5_sizecode(regex_str);
|
||||
if (sz < 0) {
|
||||
be_raise(vm, "internal_error", "error in regex");
|
||||
}
|
||||
}
|
||||
|
||||
ByteProg *code = be_os_malloc(sizeof(ByteProg) + sz);
|
||||
int ret = re1_5_compilecode(code, regex_str);
|
||||
|
@ -132,10 +132,10 @@ int be_re_match_search_all(bvm *vm, bbool is_anchored) {
|
|||
if (argc >= 3) {
|
||||
limit = be_toint(vm, 3);
|
||||
}
|
||||
int sz = re1_5_sizecode(regex_str);
|
||||
if (sz < 0) {
|
||||
int sz = re1_5_sizecode(regex_str);
|
||||
if (sz < 0) {
|
||||
be_raise(vm, "internal_error", "error in regex");
|
||||
}
|
||||
}
|
||||
|
||||
ByteProg *code = be_os_malloc(sizeof(ByteProg) + sz);
|
||||
int ret = re1_5_compilecode(code, regex_str);
|
||||
|
@ -322,10 +322,10 @@ int be_re_split(bvm *vm) {
|
|||
if (argc >= 3) {
|
||||
split_limit = be_toint(vm, 3);
|
||||
}
|
||||
int sz = re1_5_sizecode(regex_str);
|
||||
if (sz < 0) {
|
||||
int sz = re1_5_sizecode(regex_str);
|
||||
if (sz < 0) {
|
||||
be_raise(vm, "internal_error", "error in regex");
|
||||
}
|
||||
}
|
||||
|
||||
ByteProg *code = be_os_malloc(sizeof(ByteProg) + sz);
|
||||
int ret = re1_5_compilecode(code, regex_str);
|
||||
|
|
|
@ -109,7 +109,7 @@ static int m_toptr(bvm *vm)
|
|||
be_pushcomptr(vm, var_toobj(v));
|
||||
be_return(vm);
|
||||
} else if (var_type(v) == BE_INT) {
|
||||
be_pushcomptr(vm, (void*) var_toint(v));
|
||||
be_pushcomptr(vm, (void*) (intptr_t) var_toint(v));
|
||||
be_return(vm);
|
||||
} else {
|
||||
be_raise(vm, "value_error", "unsupported for this type");
|
||||
|
@ -126,7 +126,7 @@ static int m_fromptr(bvm *vm)
|
|||
if (be_iscomptr(vm, 1)) {
|
||||
v = be_tocomptr(vm, 1);
|
||||
} else {
|
||||
v = (void*) be_toint(vm, 1);
|
||||
v = (void*) (intptr_t) be_toint(vm, 1);
|
||||
}
|
||||
if (v) {
|
||||
bgcobject *ptr = (bgcobject*)v;
|
||||
|
|
|
@ -136,7 +136,7 @@ static void m_solidify_map(bvm *vm, bbool str_literal, bmap * map, const char *c
|
|||
#if BE_INTGER_TYPE == 2
|
||||
logfmt(" { be_const_key_int(%lli, %i), ", node->key.v.i, key_next);
|
||||
#else
|
||||
logfmt(" { be_const_key_int(%li, %i), ", node->key.v.i, key_next);
|
||||
logfmt(" { be_const_key_int(%i, %i), ", node->key.v.i, key_next);
|
||||
#endif
|
||||
m_solidify_bvalue(vm, str_literal, &node->value, class_name, NULL, fout);
|
||||
} else {
|
||||
|
@ -179,14 +179,14 @@ static void m_solidify_bvalue(bvm *vm, bbool str_literal, bvalue * value, const
|
|||
#if BE_INTGER_TYPE == 2
|
||||
logfmt("be_const_int(%lli)", var_toint(value));
|
||||
#else
|
||||
logfmt("be_const_int(%li)", var_toint(value));
|
||||
logfmt("be_const_int(%i)", var_toint(value));
|
||||
#endif
|
||||
break;
|
||||
case BE_INDEX:
|
||||
#if BE_INTGER_TYPE == 2
|
||||
logfmt("be_const_var(%lli)", var_toint(value));
|
||||
#else
|
||||
logfmt("be_const_var(%li)", var_toint(value));
|
||||
logfmt("be_const_var(%i)", var_toint(value));
|
||||
#endif
|
||||
break;
|
||||
case BE_REAL:
|
||||
|
|
|
@ -3282,18 +3282,18 @@ be_local_class(Matter_TLV,
|
|||
be_const_int(0),
|
||||
be_const_int(4),
|
||||
be_const_int(8),
|
||||
be_const_int(4294967295),
|
||||
be_const_int(4294967294),
|
||||
be_const_int(4294967292),
|
||||
be_const_int(4294967288),
|
||||
be_const_int(4294967295),
|
||||
be_const_int(4294967294),
|
||||
be_const_int(4294967292),
|
||||
be_const_int(4294967288),
|
||||
be_const_int(-1),
|
||||
be_const_int(-2),
|
||||
be_const_int(-4),
|
||||
be_const_int(-8),
|
||||
be_const_int(-1),
|
||||
be_const_int(-2),
|
||||
be_const_int(-4),
|
||||
be_const_int(-8),
|
||||
be_const_int(0),
|
||||
be_const_int(4294967197),
|
||||
be_const_int(4294967197),
|
||||
be_const_int(4294967197),
|
||||
be_const_int(-99),
|
||||
be_const_int(-99),
|
||||
be_const_int(-99),
|
||||
be_const_int(0),
|
||||
})) ) } )) },
|
||||
{ be_const_key_weak(EOC, -1), be_const_int(24) },
|
||||
|
|
Loading…
Reference in New Issue