[liblouis-liblouisxml] Re: Accidental bugs by not using braces

  • From: "John J. Boyer" <john.boyer@xxxxxxxxxxxxxxxxx>
  • To: liblouis-liblouisxml@xxxxxxxxxxxxx
  • Date: Mon, 24 Feb 2014 15:09:26 -0600

The liblouis and liblouisutdml code has braces where they are needed. They are 
needed around multiple statements in a code block, not around single 
statements. If there were no braces where they are 
needed we would have noticed the errors before now.

John

On Mon, Feb 24, 2014 at 08:45:01PM +0100, Mesar Hameed wrote:
> Hi,
> 
> Not sure how many people have seen the recent apple ssl bug:
> https://www.imperialviolet.org/2014/02/22/applebug.html
> but it is a mistake of not using braces around code blocks to make the program
> flow clear/obvious.
> Unfortunately, something which we have a lot of in the liblouis code.
> 
> We should probably put a todo for running with gcc -Wunreachable-code to check
> just incase.
> 
> thanks,
> Mesar



-- 
John J. Boyer; President, Chief Software Developer
Abilitiessoft, Inc.
http://www.abilitiessoft.com
Madison, Wisconsin USA
Developing software for people with disabilities

For a description of the software, to download it and links to
project pages go to http://www.abilitiessoft.com

Other related posts: