warning: passing argument 1 of 'bsearch' makes pointer from integer without a cast
and the corresponding code is
Parent =bsearch((const size_t)ParentNum, ClauseVector, Size,
sizeof(CLAUSE),pcheck_CompareNumberAndClause);
the compilar is gcc.
here CLAUSE is defined as *CLAUSE.
@Paul This following more information has been added:
The change i made to the above code is :
Parent =bsearch((uintptr_t*)(size_t)(const)ParentNum,(uintptr_t*) ClauseVector,Size,
sizeof(CLAUSE),pcheck_CompareNumberAndClause);
After compiling i got following warning:
warning: type defaults to 'int' in declaration of 'type name'
how can i correct it?
The signature for bsearch is:
It should be pretty obvious that the first parameter (at least) in your code is incorrect.
Without seeing the rest of your code it’s hard to fix this but it should probably be something like:
It would help if you posted the definitions of ParentNum, ClauseVector, Size, CLAUSE, etc.