[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: problem with g++ 2.9



On Tue, Mar 05, 2002 at 03:20:12PM +0800, a wrote:
> in my c++ program i write:  
> XtAddCallback(entry, XtNcallback, print_string, "one");
> 
> g++ 2.9 complains:
> xzip.cpp: In function `int main(int, char **)':
> xzip.cpp:35: passing `const char *' as argument 4 of
> `XtAddCallback(_WidgetRec *, const char *,
> void (*)(_WidgetRec *, void *, void *), void *)' discards qualifiers
> 
> earlier g++ does not complain

Well, it's a valid warning.  If the callback tried to modify the
argument...  Segfault?  I presume, it didn't actually cause the program
not to compile.

-- 
Eric G. Miller <egm2@jps.net>



Reply to: