[PD] pd-extended build on 9.10 /gem 0.92.1 eeepc = no luck with v4l2
Mathieu Bouchard
matju at artengine.ca
Thu Nov 5 15:33:01 CET 2009
On Thu, 5 Nov 2009, zmoelnig at iem.at wrote:
> this is the code: static lqt_file_type_t guess_qtformat(const char*
> filename) { char * extension = strrchr(filename, '.'); }
> which means: that we expect strrchr() to take "const char*" and "int", and to
> return "char*"
> "man strrchr" says:
> char *strrchr(const char *s, int c);
> i don't see any problems here. what is it, that i am missing?
Ok, I made a mistake, I thought I remembered strrchr returned const char
*. This is what your compiler is assuming, because what it reports about
is a cast from const to non-const, which is what your error message is
about.
What happens is that you are using the (new) C++ headers, which doesn't
have the above declaration as in the manpage, and instead is using the
following declarations (for covariant constness: so that the return type
is exactly like the 1st argument):
const char * strchr ( const char * str, int character );
char * strchr ( char * str, int character );
(from #include <strchr>)
_ _ __ ___ _____ ________ _____________ _____________________ ...
| Mathieu Bouchard, Montréal, Québec. téléphone: +1.514.383.3801
More information about the Pd-list
mailing list