Can't compile clist with the -Wunused-parameter compiler flag
Monochrome-Sauce opened this issue · comments
When using the clist
container, the code must be compiled with -Wno-unused-parameter
because of lines 137 and 164 in stc/clist.h
.
The code in line 137 is:
STC_INLINE bool
_cx_memb(_reserve)(_cx_self* self, size_t n)
{
return true;
}
The solution is to simply add (void)self;
and (void)n;
inside of the function definition.
I know I could've made a pull/merge-request, but I believe such a small thing is faster to report through an issue.
Thanks, I'll add it. This function is there only for possible generic algorithms (i.e macro) where you can fill a container with data by first calling reserve(), which all other containers support (along with push() and some others).
Version 4.1 is soon ready - I will make an real release this time. (just merged a dev branch to master).
You can now compile clean with -Wconversion as well. (only signed sizes and indices in he API now!).
Pushed in last commit.