Quoting "Mathieu Bouchard" matju@artengine.ca:
On Wed, 4 Nov 2009, IOhannes m zmölnig wrote:
recordQT4L.cpp: In function ?lqt_file_type_t guess_qtformat(const char*)?: recordQT4L.cpp:96: error: invalid conversion from ?const char*? to ?char*?
yah, this is dues to an overly pedantic compiler (or probably:
invalid headers: the line the error is referring to is (here; but i
might have a different version :-)) using the (const char*)
argument to guess_qtformat() as input for strchr(). according to my
man-pages, strchr() indeed takes (const char*) rather than (char*).
if this is indeed the problem, just add a cast to (const char*) to
the call of strchr(), and file a bug-report to ubuntu that they are
shipping broken headers)hi, the problem is not the type of «filename», it's the type of
«extension», because the error message is about casting const to
non-const, and not the other way around.
hmm, to summarize:
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?
apart from that: even if all or no compilers are that pedantic, i
don't experience the said problem when building myself (e.g. on debian
using g++-4.3.4-5)
it is not that i never compile Gem using gcc...
fgmasdr IOhannes
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard, Montréal, Québec. téléphone: +1.514.383.3801
This message was sent using IMP, the Internet Messaging Program.