At a glance, this looks wrong.

Old loop ignored comment lines by eating chars until a newline is encountered.
New loop has 50% chance of gobbling too many chars and parsing subsequent lines 
wrong.

Code, old and new, is not portable to Windows, should probably call bu_fgets() 
to read the ascii lines.



On Sep 15, 2013, at 11:59 AM, [email protected] wrote:

> Revision: 57663
>          http://sourceforge.net/p/brlcad/code/57663
> Author:   starseeker
> Date:     2013-09-15 15:59:49 +0000 (Sun, 15 Sep 2013)
> Log Message:
> -----------
> Clang error - 'while loop has empty body'
> 
> Modified Paths:
> --------------
>    brlcad/trunk/src/libicv/ppm.c
> 
> Modified: brlcad/trunk/src/libicv/ppm.c
> ===================================================================
> --- brlcad/trunk/src/libicv/ppm.c     2013-09-15 15:49:12 UTC (rev 57662)
> +++ brlcad/trunk/src/libicv/ppm.c     2013-09-15 15:59:49 UTC (rev 57663)
> @@ -119,7 +119,7 @@
>     /* check for comments in PPM image*/
>     c = getc(fp);
>     while (c == '#') {
> -     while (getc(fp) != '\n') ;
> +     while (getc(fp) != '\n')
>           c = getc(fp);
>     }
> 
> 
> This was sent by the SourceForge.net collaborative development platform, the 
> world's largest Open Source development site.
> 
> 
> ------------------------------------------------------------------------------
> LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
> 1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
> 2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
> Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/22/13. 
> http://pubads.g.doubleclick.net/gampad/clk?id=64545871&iu=/4140/ostg.clktrk
> _______________________________________________
> BRL-CAD Source Commits mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/brlcad-commits


------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. 
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
BRL-CAD Developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-devel

Reply via email to