Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

unknown warning when installing cd-hit, issue? #141

Open
Robvh-git opened this issue Oct 13, 2023 · 1 comment
Open

unknown warning when installing cd-hit, issue? #141

Robvh-git opened this issue Oct 13, 2023 · 1 comment

Comments

@Robvh-git
Copy link

During the building/install of CD-hit on PopOS, I get following warning:

In file included from cdhit-common.c++:28:
In member function ‘void NVector<TYPE>::Resize(int, const TYPE&) [with TYPE = long int]’,
    inlined from ‘NVector<TYPE>::NVector(int, const TYPE&) [with TYPE = long int]’ at cdhit-common.h:119:10,
    inlined from ‘int local_band_align(char*, char*, int, int, ScoreMatrix&, int&, int&, int&, float&, int*, int, int, int, WorkingBuffer&)’ at cdhit-common.c++:815:36:
cdhit-common.h:144:55: warning: argument 1 range [18446744056529682448, 18446744073709551608] exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=]
  144 |                                 items = (TYPE*)realloc( items, capacity*sizeof(TYPE) );
      |                                                ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cdhit-common.h: In function ‘int local_band_align(char*, char*, int, int, ScoreMatrix&, int&, int&, int&, float&, int*, int, int, int, WorkingBuffer&)’:
cdhit-common.h:144:55: note: in a call to built-in allocation function ‘void* __builtin_malloc(long unsigned int)’

I've installed this numerously on Ubuntu and never receiver this warning., I recently switched to PopOS, which is a derivative from Ubuntu. It appears that the installation of CDHIT was succesful, but I'll test it soon.

However, what could cause this warning, as I've never seen it before? And could this jeopardize the functioning of CD-HIT?

@GiacomoT23
Copy link

I solved this issue replacing

items = (TYPE*)realloc( items, capacity*sizeof(TYPE) );


 with

items = (TYPE*)realloc(items, (unsigned int)(capacity * sizeof(TYPE)));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants