[bt-devel] Problems with GCC 4.3.2 on Kubuntu 8.10

Martin Gruner mg.pub at gmx.net
Fri Nov 7 01:00:09 MST 2008


Hi Gary,

I also made a change to Sword SVN. In the next version these warnings should be gone, if I didn't miss anything.

mg

am Freitag, 7. November 2008 um 06:52 schrieben Sie:

> Eeli Kaikkonen wrote:
>> Eeli Kaikkonen wrote:
>>   
>>> Martin Gruner wrote:
>>>   
>>>     
>>>> Hi Eeli,

>>>> I removed the problematic const modifiers last night.

>>>>       
>>> OK, I'll see what's left and if it's worth changing.

>>> Meanwhile, good reading about const: 
>>> http://www.parashift.com/c++-faq-lite/const-correctness.html. I warmly 
>>> recommend it especially because there have been so much confusion in our 
>>> code.  
>>>     

>> The list of changes looks very similar to mine. After reading the diff 
>> of your commit I found only one place where I wonder if the change was 
>> correct. In cbtconfig const QFont& CBTConfig::getDefault is changed to 
>> QFont&... and it should be legal to have const there. The semantics is 
>> the same when returning "const QFont*" which means that you can't change 
>> the QFont object through the pointer/reference. It stops unwanted 
>> modifications of objects.

>> Those which Greg detected were probably "x* const y()"s and they are now 
>> rightly corrected, as are numerous "const x y()"s. I don't find any 
>> other cases which should be changed, so Martin's commit was enough.

>> --Eeli Kaikkonen

>> _______________________________________________
>> bt-devel mailing list
>> bt-devel at crosswire.org
>> http://www.crosswire.org/mailman/listinfo/bt-devel
>>   

> I am glad you have eliminated these warning for ubuntu 8.10. I see that 
> there
> are still warnings left but they are all coming from /usr/include/sword 
> and they
> look like this:
>   /usr/include/sword/swmodule.h:171: warning: type qualifiers ignored on 
> function return type

> I decided to get rid of these. You can edit the following two files in
> /usr/include/sword.

> versekey.h
> 391c391
> <       static const int getOSISBookNum(const char *bookab);
> ---
 >>       static int getOSISBookNum(const char *bookab);


> swmodule.h
> 171c171
> <       virtual const bool isUnicode() const { return (encoding == 
> (char)ENC_UTF8 || encoding == (char)ENC_SCSU); }
> ---
 >>       virtual bool isUnicode() const { return (encoding == 
> (char)ENC_UTF8 || encoding == (char)ENC_SCSU); }
> 183c183
> <       virtual const int getEntrySize() const { return entrySize; }
> ---
 >>       virtual int getEntrySize() const { return entrySize; }

> This is safe to do since they were ignored anyway.

> Gary


> _______________________________________________
> bt-devel mailing list
> bt-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/bt-devel



-- 
Mit freundlichen Grüßen
Martin Gruner
mailto:mg.pub at gmx.net




More information about the bt-devel mailing list