lslebodn / SSSD / sssd

Forked from SSSD/sssd 7 years ago
Clone

1c42c39 PYSSS_MURMUR: Fix [-Wsign-compare] found by gcc

1 file Authored by fidencio 6 years ago, Committed by lslebodn 6 years ago,
    PYSSS_MURMUR: Fix [-Wsign-compare] found by gcc
    
    While building the project I've noticed the following warning:
    ../src/python/pysss_murmur.c: In function ‘py_murmurhash3’:
    ../src/python/pysss_murmur.c:50:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             (size_t)key_len > input_len) {
                             ^
    
    Previously we were comparing key_len(long) with the output of strlen(key)
    (size_t), thus the (size_t) cast.
    
    Currently, we can jut compare key_len with input_len without issues and
    without the needed to the cast.
    
    Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
    Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
    
    Related to:
    https://pagure.io/SSSD/sssd/issue/3592
    
        
file modified
+1 -1