Re: Warning


Subject: Re: Warning
From: Thomas Fletcher (thomasf@qnx.com)
Date: Mon Aug 14 2000 - 07:54:17 CDT


On Sun, 13 Aug 2000, Pierre Abbat wrote:

> I'm compiling a modification to properly derelativize multiple font paths
> (patch coming soon) and get the following:
>
> xap_UnixApp.cpp: In method `UT_Bool XAP_UnixApp::_loadFonts()':
> xap_UnixApp.cpp:203: warning: passing `const char *' as argument 1 of `free(void *)' discards qualifiers
>
> Is this anything to worry about?

Yes ... and maybe no. I haven't looked at the code, but
if you are passing a const char * then it is presumably
pointing at a static block of memory, or something that
is owned by someone else, in which case you shouldn't
really be freeing it (let the owner take care of that).

You would have to look at the code more closely to determine
if this was the case or not.

Thomas
-------------------------------------------------------------
Thomas (toe-mah) Fletcher QNX Software Systems
thomasf@qnx.com Neutrino Development Group
(613)-591-0931 http://www.qnx.com/~thomasf



This archive was generated by hypermail 2b25 : Mon Aug 14 2000 - 07:53:50 CDT