Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

warning: conversion from ‘long unsigned int’ to ‘khint32_t’ {aka ‘unsigned int’} may change value #187

Open
aganm opened this issue Jan 7, 2025 · 0 comments

Comments

@aganm
Copy link

aganm commented Jan 7, 2025

gcc has this complaint about the KHASH_MAP_INIT_INT64 macro:

../external/khash.h:170:53: warning: conversion fromlong unsigned inttokhint32_t’ {aka ‘unsigned int’} may change value [-Wconversion]
  170 | #define __ac_set_isboth_false(flag, i) (flag[i>>4]&=~(3ul<<((i&0xfU)<<1)))
      |                                                     ^
../external/khash.h:343:25: note: in expansion of macro__ac_set_isboth_false343 |                         __ac_set_isboth_false(h->flags, x);                                                     \
      |                         ^~~~~~~~~~~~~~~~~~~~~
../external/khash.h:363:9: note: in expansion of macro__KHASH_IMPL363 |         __KHASH_IMPL(name, SCOPE, khkey_t, khval_t, kh_is_map, __hash_func, __hash_equal)
      |         ^~~~~~~~~~~~
../external/khash.h:366:9: note: in expansion of macroKHASH_INIT2366 |         KHASH_INIT2(name, static kh_inline klib_unused, khkey_t, khval_t, kh_is_map, __hash_func, __hash_equal)
      |         ^~~~~~~~~~~
../external/khash.h:609:9: note: in expansion of macroKHASH_INIT609 |         KHASH_INIT(name, khint64_t, khval_t, 1, kh_int64_hash_func, kh_int64_hash_equal)
      |         ^~~~~~~~~~
in expansion of macroKHASH_MAP_INIT_INT64956 | KHASH_MAP_INIT_INT64(kmap, khint32_t)
      | ^~~~~~~~~~~~~~~~~~~~
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant