• Christian Göttsche's avatar
    selinux: use int arrays for boolean values · c3fae2b2
    Christian Göttsche authored
    Do not cast pointers of signed integers to pointers of unsigned integers
    and vice versa.
    
    It should currently not be an issue since they hold SELinux boolean
    values which should only contain either 0's or 1's, which should have
    the same representation.
    
    Reported by sparse:
    
      .../selinuxfs.c:1485:30: warning: incorrect type in assignment
                                        (different signedness)
      .../selinuxfs.c:1485:30:    expected unsigned int *
      .../selinuxfs.c:1485:30:    got int *[addressable] values
      .../selinuxfs.c:1402:48: warning: incorrect type in argument 3
                                        (different signedness)
      .../selinuxfs.c:1402:48:    expected int *values
      .../selinuxfs.c:1402:48:    got unsigned int *bool_pending_values
    Signed-off-by: default avatarChristian Göttsche <cgzones@googlemail.com>
    [PM: minor whitespace fixes, sparse output cleanup]
    Signed-off-by: default avatarPaul Moore <paul@paul-moore.com>
    c3fae2b2
selinuxfs.c 53.6 KB