Skip to content

Commit aafa98b

Browse files
committed
Update bit type
Avoid potential truncations and compiler warnings: setools/policyrep.c: In function ‘__pyx_f_7setools_9policyrep_13SELinuxPolicy__rebuild_attrs_from_map’: setools/policyrep.c:88248:33: warning: comparison of integer expressions of different signedness: ‘int’ and ‘uint32_t’ {aka ‘unsigned int’} [-Wsign-compare] 88248 | __pyx_t_7 = ((__pyx_v_bit < ebitmap_length((&(__pyx_v_self->handle->p.attr_type_map[__pyx_v_i])))) != 0); | ^ setools/policyrep.c:88356:33: warning: comparison of integer expressions of different signedness: ‘int’ and ‘uint32_t’ {aka ‘unsigned int’} [-Wsign-compare] 88356 | __pyx_t_7 = ((__pyx_v_bit < ebitmap_length((&__pyx_v_tmp_type->types))) != 0); | ^ Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
1 parent 9b4a77f commit aafa98b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

setools/policyrep/selinuxpolicy.pxi

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -935,8 +935,7 @@ cdef class SELinuxPolicy:
935935
"""
936936

937937
cdef:
938-
size_t i, count
939-
int bit
938+
size_t bit, i, count
940939
sepol.ebitmap_node_t *node = NULL
941940
sepol.type_datum_t *tmp_type
942941
char *tmp_name

0 commit comments

Comments
 (0)