You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cdef:
unsignedint i
__u16 lenif i <len-1:
warning: comparison of integer expressions of different signedness: ‘unsignedint’ and ‘int’ [-Wsign-compare]
22194| __pyx_t_1 = (__pyx_cur_scope->__pyx_v_i < (__pyx_cur_scope->__pyx_v_self->__pyx_base.len -1));
The text was updated successfully, but these errors were encountered:
If the signed type can represent all values of the unsigned type, then the operand with the unsigned type is implicitly converted to the signed type.
I assume __u16 is a 16-bit unsigned int. The 1 is a signed int (either 32 or 64 bit depending on the platform) so I think that rule will apply and len - 1 will also be a signed int.
Not completely sure though because I haven't read and understood all of that page. But I'm fairly sure this is mostly C and not Cython
Describe the bug
Both
i
andlen
areunsigned
Code to reproduce the behaviour:
The text was updated successfully, but these errors were encountered: