[Vm-dev] suspect assignment in sqMacUIClipBoard.c line 91

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Fri Aug 31 17:33:05 UTC 2012


Ah... well burried intentions.
The right word for this kind of exercize is
http://en.wikipedia.org/wiki/Hermeneutics ;)

Nicolas

2012/8/31 Eliot Miranda <eliot.miranda at gmail.com>:
>
> Nicolas,
>
>     thanks for this review!  I've updated my master copies of both the Mac files you mention.  Since the fixes don't seem to be urgent I'll release them when other fixes arrive.
>
> On Thu, Aug 30, 2012 at 3:01 PM, Nicolas Cellier <nicolas.cellier.aka.nice at gmail.com> wrote:
>>
>>
>> intention of this line
>>                         return (err = 0);
>> might well be
>>                         return (err == 0);
>
>
> Looks to me that this is historical; perhaps err was global?  clipboardWriteFromAt only ever returns 0, so I think it should read "return 0;".
>
>>
>>
>> A clue, previously assigned value is not used
>>     err = PasteboardPutItemFlavor (pb, (PasteboardItemID)1,
>> kUTTypeUTF16PlainText, data, 0);
>>
>> These are useful Xcode warnings that we should not ignore.
>>
>> Nicolas
>
>
>
>
> --
> best,
> Eliot
>
>


More information about the Vm-dev mailing list