Skip to content

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

@aganm

Description

@aganm

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)
      | ^~~~~~~~~~~~~~~~~~~~

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions