[Verse-dev] Weird address size bug

Justizin justizin at gmail.com
Thu Jul 20 18:04:45 CEST 2006


I wonder if there are unit tests on pyverse which could help maintain
the expected functionality of bits like this, or if there could be. ;)

On 7/20/06, Emil Brink <emil at obsession.se> wrote:
> Eskil,
>
> while looking through the code and compiling with even more warnings
> than usual, I found this function:
>
> void v_cmd_buf_set_size(VCMDBufHead *head, unsigned int size)
> {
>         if(head->address_size > size);
>                 head->address_size = size;
>         head->size = size;
> }
>
> At first glance, it looks simple and nice, but closer inspection
> reveals the spurious semi colon right after the if. So, in effect
> this function reads like this:
>
> void v_cmd_buf_set_size(VCMDBufHead *head, unsigned int size)
> {
>         head->address_size = size;
>         head->size = size;
> }
>
> Should I replace it with this? The more obvious fix, to just remove
> the semi colon and assume that the if is correct, does not work. If
> done that way, the communication becomes unreliable and data is lost.
>
> Any ideas?
>
> Regards,
>
> /Emil
> _______________________________________________
> Verse-dev mailing list
> Verse-dev at projects.blender.org
> http://projects.blender.org/mailman/listinfo/verse-dev
>


-- 
Justizin, Independent Interactivity Architect
Computer Graphics Ninja Overlord
ACM / SIGGRAPH SysMgr, Reporter
http://metaverse.siggraph.org/

"It's all good." -Søren Kierkegaard


More information about the Verse-dev mailing list