[Libreoffice] warnig and coding, need a little help on C++

2010-11-25 Thread Pierre-André Jacquod
Hello, as I said, still in warm up phase and getting back familiar with C++.. So cleaning is a good exercise. I got a compiler warning: filters/binfilter/bf_sw/source/core/para/sw_paratr.cxx:214:26: warning: 'nTemp' may be used uninitialized in this function for this: case MID_DROPCAP_LINES :

Re: [Libreoffice] warnig and coding, need a little help on C++

2010-11-25 Thread Caolán McNamara
On Thu, 2010-11-25 at 19:41 +0100, Pierre-André Jacquod wrote: { sal_Int8 nTemp; rVal = nTemp; if(nTemp =1 nTemp 0x7f nLines = (BYTE)nTemp; } Well, that's fine for me, nTemp is effectively not initialized. And the second line is then the same as: rVal = rVal nTemp

Re: [Libreoffice] warnig and coding, need a little help on C++

2010-11-25 Thread Pierre-André Jacquod
Thanks for helping. Heh, this also confuses cppcheck as well. cough... cough... ! I am not smarter than a machine... ! A professor I had told: this not a good point being too smart... I understand what he meant. For stepping in, not the easiest way. Once there is no waring any more when