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

Gary Holmlund gary.holmlund at gmail.com
Thu Nov 6 22:52:15 MST 2008


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




More information about the bt-devel mailing list