diff options
author | Thiago de Arruda <tpadilha84@gmail.com> | 2014-05-16 14:46:33 -0300 |
---|---|---|
committer | Thiago de Arruda <tpadilha84@gmail.com> | 2014-05-17 08:05:44 -0300 |
commit | 45e5a18f3a8c44c5ecf54956d1a8248e1bf6f3e3 (patch) | |
tree | b510dad99a7d8bcb167053fec7d9e3bf28aeff89 /src/nvim/lib/khash.h | |
parent | 76a2fb5667461a8b7fa1abfb5a2c7381ced3f519 (diff) | |
download | rneovim-45e5a18f3a8c44c5ecf54956d1a8248e1bf6f3e3.tar.gz rneovim-45e5a18f3a8c44c5ecf54956d1a8248e1bf6f3e3.tar.bz2 rneovim-45e5a18f3a8c44c5ecf54956d1a8248e1bf6f3e3.zip |
Enable -Wconversion for API files and fix errors
Diffstat (limited to 'src/nvim/lib/khash.h')
-rw-r--r-- | src/nvim/lib/khash.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nvim/lib/khash.h b/src/nvim/lib/khash.h index ada7da05b1..ce2862a1f1 100644 --- a/src/nvim/lib/khash.h +++ b/src/nvim/lib/khash.h @@ -158,10 +158,10 @@ typedef khint_t khiter_t; #define __ac_isempty(flag, i) ((flag[i>>4]>>((i&0xfU)<<1))&2) #define __ac_isdel(flag, i) ((flag[i>>4]>>((i&0xfU)<<1))&1) #define __ac_iseither(flag, i) ((flag[i>>4]>>((i&0xfU)<<1))&3) -#define __ac_set_isdel_false(flag, i) (flag[i>>4]&=~(1ul<<((i&0xfU)<<1))) -#define __ac_set_isempty_false(flag, i) (flag[i>>4]&=~(2ul<<((i&0xfU)<<1))) -#define __ac_set_isboth_false(flag, i) (flag[i>>4]&=~(3ul<<((i&0xfU)<<1))) -#define __ac_set_isdel_true(flag, i) (flag[i>>4]|=1ul<<((i&0xfU)<<1)) +#define __ac_set_isdel_false(flag, i) (flag[i>>4]&=~(khint_t)(1ul<<((i&0xfU)<<1))) +#define __ac_set_isempty_false(flag, i) (flag[i>>4]&=~(khint_t)(2ul<<((i&0xfU)<<1))) +#define __ac_set_isboth_false(flag, i) (flag[i>>4]&=~(khint_t)(3ul<<((i&0xfU)<<1))) +#define __ac_set_isdel_true(flag, i) (flag[i>>4]|=(khint_t)1ul<<((i&0xfU)<<1)) #define __ac_fsize(m) ((m) < 16? 1 : (m)>>4) @@ -400,7 +400,7 @@ static const double __ac_HASH_UPPER = 0.77; static kh_inline khint_t __ac_X31_hash_string(const char *s) { khint_t h = (khint_t)*s; - if (h) for (++s ; *s; ++s) h = (h << 5) - h + (khint_t)*s; + if (h) for (++s ; *s; ++s) h = (h << 5) - h + (uint8_t)*s; return h; } /*! @function |